summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>2015-01-20 10:18:56 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2015-03-16 12:01:43 +0000
commitbe8e3196a3e236c4f668d761138e3119dc68f0ce (patch)
treee06152293c518acd69830c14f321a7df8dc4a1ed /gst
parentac8a27238145f64eabf89f6ab94b0a65fdc56e18 (diff)
flvdemux: Don't repeatedly warn after no_more_pads (v2)
This can get rather spammy for such a high log level. Only warn once per stream. https://bugzilla.gnome.org/show_bug.cgi?id=746274
Diffstat (limited to 'gst')
-rw-r--r--gst/flv/gstflvdemux.c27
-rw-r--r--gst/flv/gstflvdemux.h5
2 files changed, 26 insertions, 6 deletions
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c
index 827cf4ec0..ec8f78bc8 100644
--- a/gst/flv/gstflvdemux.c
+++ b/gst/flv/gstflvdemux.c
@@ -927,9 +927,14 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
GST_LOG_OBJECT (demux, "parsing an audio tag");
- if (demux->no_more_pads && !demux->audio_pad) {
- GST_WARNING_OBJECT (demux,
- "Signaled no-more-pads already but had no audio pad -- ignoring");
+ if G_UNLIKELY (!demux->audio_pad && demux->no_more_pads) {
+#ifndef GST_DISABLE_DEBUG
+ if G_UNLIKELY (!demux->no_audio_warned) {
+ GST_WARNING_OBJECT (demux,
+ "Signaled no-more-pads already but had no audio pad -- ignoring");
+ demux->no_audio_warned = TRUE;
+ }
+#endif
return GST_FLOW_OK;
}
@@ -1327,9 +1332,14 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer)
GST_LOG_OBJECT (demux, "parsing a video tag");
- if (demux->no_more_pads && !demux->video_pad) {
- GST_WARNING_OBJECT (demux,
- "Signaled no-more-pads already but had no video pad -- ignoring");
+ if G_UNLIKELY (!demux->video_pad && demux->no_more_pads) {
+#ifndef GST_DISABLE_DEBUG
+ if G_UNLIKELY (!demux->no_video_warned) {
+ GST_WARNING_OBJECT (demux,
+ "Signaled no-more-pads already but had no video pad -- ignoring");
+ demux->no_video_warned = TRUE;
+ }
+#endif
return GST_FLOW_OK;
}
@@ -1830,6 +1840,11 @@ gst_flv_demux_cleanup (GstFlvDemux * demux)
demux->no_more_pads = FALSE;
+#ifndef GST_DISABLE_DEBUG
+ demux->no_audio_warned = FALSE;
+ demux->no_video_warned = FALSE;
+#endif
+
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
demux->w = demux->h = 0;
diff --git a/gst/flv/gstflvdemux.h b/gst/flv/gstflvdemux.h
index 5fb6c1110..aa8d6ac9f 100644
--- a/gst/flv/gstflvdemux.h
+++ b/gst/flv/gstflvdemux.h
@@ -132,6 +132,11 @@ struct _GstFlvDemux
gboolean no_more_pads;
+#ifndef GST_DISABLE_DEBUG
+ gboolean no_audio_warned;
+ gboolean no_video_warned;
+#endif
+
gboolean seeking;
gboolean building_index;
gboolean indexed; /* TRUE if index is completely built */