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.
This commit is contained in:
Wim Taymans 2010-10-22 13:03:12 +02:00
parent cc2a6e493b
commit d82633c4e3

View file

@ -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