From d82633c4e30bc3312c600e43422bb1c7730e6437 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 22 Oct 2010 13:03:12 +0200 Subject: [PATCH] ffdec: don't destroy the parser state When we flush the parser cache, we only need to clear the bytes of the cache, not the complete state of the cache. In the case of H264 this doesn't require the parser to receive a new SPS/PPS after a DISCONT buffer. --- ext/ffmpeg/gstffmpegdec.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index b959598b2e..b09b12efd0 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -2285,14 +2285,6 @@ gst_ffmpegdec_flush_pcache (GstFFMpegDec * ffmpegdec) gst_buffer_unref (ffmpegdec->pcache); ffmpegdec->pcache = NULL; } - if (ffmpegdec->pctx) { - GstFFMpegDecClass *oclass; - - oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec)); - - av_parser_close (ffmpegdec->pctx); - ffmpegdec->pctx = av_parser_init (oclass->in_plugin->id); - } } static gboolean