ext/ffmpeg/gstffmpegdec.c: Do early keyframe check again, feeding bad data in ffmpeg is not a good idea after all.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Do early keyframe check again, feeding bad data in ffmpeg is not a good
idea after all.
This commit is contained in:
Wim Taymans 2006-09-06 14:53:59 +00:00
parent d3528950b9
commit 8260664273
2 changed files with 6 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2006-09-06 Wim Taymans <wim@fluendo.com>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Do early keyframe check again, feeding bad data in ffmpeg is not a good
idea after all.
2006-09-06 Wim Taymans <wim@fluendo.com>
Patch by: Mark Nauwelaerts <manauw at skynet dot be>

View file

@ -1770,7 +1770,6 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
ffmpegdec->next_ts = GST_CLOCK_TIME_NONE;
}
#ifdef EARLY_KEYFRAME_CHECK
/* do early keyframe check pretty bad to rely on the keyframe flag in the
* source for this as it might not even be parsed (UDP/file/..). */
if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
@ -1780,7 +1779,6 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
GST_DEBUG_OBJECT (ffmpegdec, "got keyframe");
ffmpegdec->waiting_for_key = FALSE;
}
#endif
pending_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
pending_duration = GST_BUFFER_DURATION (inbuf);
@ -1945,14 +1943,12 @@ not_negotiated:
gst_buffer_unref (inbuf);
return GST_FLOW_NOT_NEGOTIATED;
}
#ifdef EARLY_KEYFRAME_CHECK
skip_keyframe:
{
GST_DEBUG_OBJECT (ffmpegdec, "skipping non keyframe");
gst_buffer_unref (inbuf);
return GST_FLOW_OK;
}
#endif
}
static GstStateChangeReturn