From ac8a27238145f64eabf89f6ab94b0a65fdc56e18 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 16 Mar 2015 11:23:52 +0100 Subject: [PATCH] flvdemux: Introduce constant for no-more-pads threshold https://bugzilla.gnome.org/show_bug.cgi?id=746274 --- gst/flv/gstflvdemux.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index f60a74002b..827cf4ec02 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -97,6 +97,9 @@ G_DEFINE_TYPE (GstFlvDemux, gst_flv_demux, GST_TYPE_ELEMENT); /* two seconds - consider dts are resynced to another base if this different */ #define RESYNC_THRESHOLD 2000 +/* how much stream time to wait for audio tags to appear after we have video, or vice versa */ +#define NO_MORE_PADS_THRESHOLD (6 * GST_SECOND) + static gboolean flv_demux_handle_seek_push (GstFlvDemux * demux, GstEvent * event); static gboolean gst_flv_demux_handle_seek_pull (GstFlvDemux * demux, @@ -1171,7 +1174,7 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer) if (G_UNLIKELY (!demux->no_more_pads && (GST_CLOCK_DIFF (demux->audio_start, - GST_BUFFER_TIMESTAMP (outbuf)) > 6 * GST_SECOND))) { + GST_BUFFER_TIMESTAMP (outbuf)) > NO_MORE_PADS_THRESHOLD))) { GST_DEBUG_OBJECT (demux, "Signalling no-more-pads because no video stream was found" " after 6 seconds of audio"); @@ -1558,7 +1561,7 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer) if (G_UNLIKELY (!demux->no_more_pads && (GST_CLOCK_DIFF (demux->video_start, - GST_BUFFER_TIMESTAMP (outbuf)) > 6 * GST_SECOND))) { + GST_BUFFER_TIMESTAMP (outbuf)) > NO_MORE_PADS_THRESHOLD))) { GST_DEBUG_OBJECT (demux, "Signalling no-more-pads because no audio stream was found" " after 6 seconds of video"); -- 2.34.1