From: <rb...@fr...> - 2005-01-19 14:33:03
|
CVS Root: /cvs/gstreamer Module: gst-ffmpeg Changes by: rbultje Date: Wed Jan 19 2005 06:33:01 PST Log message: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event): Only flush when the codec is opened. Modified files: . : ChangeLog ext/ffmpeg : gstffmpegdec.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ChangeLog.diff?r1=1.120&r2=1.121 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdec.c.diff?r1=1.80&r2=1.81 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-ffmpeg/ChangeLog,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- ChangeLog 19 Jan 2005 12:41:34 -0000 1.120 +++ ChangeLog 19 Jan 2005 14:32:49 -0000 1.121 @@ -1,5 +1,10 @@ 2005-01-19 Ronald S. Bultje <rb...@ro...> + * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event): + Only flush when the codec is opened. + +2005-01-19 Ronald S. Bultje <rb...@ro...> * 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): Index: gstffmpegdec.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdec.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- gstffmpegdec.c 19 Jan 2005 12:41:34 -0000 1.80 +++ gstffmpegdec.c 19 Jan 2005 14:32:49 -0000 1.81 @@ -660,7 +660,9 @@ { 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_WARNING_OBJECT (ffmpegdec, "Received discont with no useful value..."); } /* fall-through */ } default: |