Original commit message from CVS:
* 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/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),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_register):
{
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;
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: