mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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).
This commit is contained in:
parent
395ebbdf4b
commit
15ffb2974a
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue