diff options
author | Edward Hervey <edward@collabora.com> | 2013-08-03 14:20:47 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-08-04 12:08:57 +0200 |
commit | b17676a1d5f1f9179eef32b92b22ecfbce902112 (patch) | |
tree | 638dd6598b6afe2928137d893b88b8eeebe03074 | |
parent | 5b63a7c8e090123117c03acdffaa3bdcb9ed50c7 (diff) | |
download | gstreamer-plugins-bad-b17676a1d5f1f9179eef32b92b22ecfbce902112.tar.gz |
h264parse: Do not trigger caps update if we only have PPS updates
Updating caps results in downstream elements potentially reconfiguring themselves
(such as decoders). If we do this in the middle of keyframes, we would result
in those elements being reconfigured and handling garbage until the next keyframe.
Instead of this only send (potentially) new codec_data when we have *both* SPS and
PPS.
https://bugzilla.gnome.org/show_bug.cgi?id=705333
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index f0d6e87f9..0a2f69d4f 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -509,8 +509,10 @@ gst_h264_parse_process_nal (GstH264Parse * h264parse, GstH264NalUnit * nalu) GST_WARNING_OBJECT (h264parse, "failed to parse PPS:"); /* parameters might have changed, force caps check */ - GST_DEBUG_OBJECT (h264parse, "triggering src caps check"); - h264parse->update_caps = TRUE; + if (!h264parse->have_pps) { + GST_DEBUG_OBJECT (h264parse, "triggering src caps check"); + h264parse->update_caps = TRUE; + } h264parse->have_pps = TRUE; if (h264parse->push_codec && h264parse->have_sps) { /* SPS and PPS found in stream before the first pre_push_frame, no need |