mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
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
This commit is contained in:
parent
ac8a272381
commit
be8e3196a3
2 changed files with 26 additions and 6 deletions
|
@ -927,9 +927,14 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer)
|
||||||
|
|
||||||
GST_LOG_OBJECT (demux, "parsing an audio tag");
|
GST_LOG_OBJECT (demux, "parsing an audio tag");
|
||||||
|
|
||||||
if (demux->no_more_pads && !demux->audio_pad) {
|
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,
|
GST_WARNING_OBJECT (demux,
|
||||||
"Signaled no-more-pads already but had no audio pad -- ignoring");
|
"Signaled no-more-pads already but had no audio pad -- ignoring");
|
||||||
|
demux->no_audio_warned = TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return GST_FLOW_OK;
|
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");
|
GST_LOG_OBJECT (demux, "parsing a video tag");
|
||||||
|
|
||||||
if (demux->no_more_pads && !demux->video_pad) {
|
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,
|
GST_WARNING_OBJECT (demux,
|
||||||
"Signaled no-more-pads already but had no video pad -- ignoring");
|
"Signaled no-more-pads already but had no video pad -- ignoring");
|
||||||
|
demux->no_video_warned = TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1830,6 +1840,11 @@ gst_flv_demux_cleanup (GstFlvDemux * demux)
|
||||||
|
|
||||||
demux->no_more_pads = FALSE;
|
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);
|
gst_segment_init (&demux->segment, GST_FORMAT_TIME);
|
||||||
|
|
||||||
demux->w = demux->h = 0;
|
demux->w = demux->h = 0;
|
||||||
|
|
|
@ -132,6 +132,11 @@ struct _GstFlvDemux
|
||||||
|
|
||||||
gboolean no_more_pads;
|
gboolean no_more_pads;
|
||||||
|
|
||||||
|
#ifndef GST_DISABLE_DEBUG
|
||||||
|
gboolean no_audio_warned;
|
||||||
|
gboolean no_video_warned;
|
||||||
|
#endif
|
||||||
|
|
||||||
gboolean seeking;
|
gboolean seeking;
|
||||||
gboolean building_index;
|
gboolean building_index;
|
||||||
gboolean indexed; /* TRUE if index is completely built */
|
gboolean indexed; /* TRUE if index is completely built */
|
||||||
|
|
Loading…
Reference in a new issue