diff options
-rw-r--r-- | gst/flv/gstflvdemux.c | 27 | ||||
-rw-r--r-- | gst/flv/gstflvdemux.h | 5 |
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 */ |