Commit 0ee46f8b authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegdec.c: Only flush when the codec is opened.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event):
Only flush when the codec is opened.
parent 0403bd43
2005-01-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event):
Only flush when the codec is opened.
2005-01-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
......
......@@ -660,7 +660,9 @@ gst_ffmpegdec_handle_event (GstFFMpegDec * ffmpegdec, GstEvent * event)
{
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
avcodec_flush_buffers (ffmpegdec->context);
if (ffmpegdec->opened) {
avcodec_flush_buffers (ffmpegdec->context);
}
goto forward;
case GST_EVENT_DISCONTINUOUS: {
gint64 value;
......@@ -685,7 +687,9 @@ gst_ffmpegdec_handle_event (GstFFMpegDec * ffmpegdec, GstEvent * event)
GST_WARNING_OBJECT (ffmpegdec,
"Received discont with no useful value...");
}
avcodec_flush_buffers (ffmpegdec->context);
if (ffmpegdec->opened) {
avcodec_flush_buffers (ffmpegdec->context);
}
/* fall-through */
}
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment