From a951584eabc515d3386e0b0fbd01ebbf2c98bf92 Mon Sep 17 00:00:00 2001 From: Johns Date: Wed, 7 Dec 2011 22:06:08 +0100 Subject: [PATCH] Close codec written. --- codec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/codec.c b/codec.c index 8cc0124..b8fda3e 100644 --- a/codec.c +++ b/codec.c @@ -344,8 +344,12 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id) */ void CodecVideoClose(VideoDecoder * video_decoder) { - (void)video_decoder; - // FIXME: write close code + // FIXME: play buffered data + av_freep(&video_decoder->Frame); + if ( video_decoder->VideoCtx ) { + avcodec_close(video_decoder->VideoCtx); + av_freep(&video_decoder->VideoCtx); + } } #if 0