Commit 15ffb297 authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegdec.c: Safety bet to not completely crush the system on...

ext/ffmpeg/gstffmpegdec.c: Safety bet to not completely crush the system on EOS. Fixes the bad behaviour of #300200 (...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event):
Safety bet to not completely crush the system on EOS. Fixes the
bad behaviour of #300200 (doesn't fix the actual issue).
parent 395ebbdf
2005-04-14 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_handle_event):
Safety bet to not completely crush the system on EOS. Fixes the
bad behaviour of #300200 (doesn't fix the actual issue).
2005-04-02 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
......
......@@ -778,14 +778,15 @@ gst_ffmpegdec_handle_event (GstFFMpegDec * ffmpegdec, GstEvent * event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS: {
gint have_data, len;
gint have_data, len, try = 0;
/* max. 10 times, for safety (see e.g. #300200) */
do {
len = gst_ffmpegdec_frame (ffmpegdec, NULL, 0, &have_data,
&ffmpegdec->next_ts);
if (len < 0 || have_data == 0)
break;
} while (1);
} while (try++ < 10);
goto forward;
}
case GST_EVENT_FLUSH:
......
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