mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 02:45:35 +00:00
videodecoder, audiodecoder: parse format before checking in src_query_default
The logic change in these commits misordered the parsing and checking of format in position queries:2b06e54
videodecoder: Don't answer BYTES queries1840b02
audio: Don't answer BYTES queries https://bugzilla.gnome.org/show_bug.cgi?id=774484
This commit is contained in:
parent
826eec22f7
commit
e740103669
2 changed files with 4 additions and 2 deletions
|
@ -2769,6 +2769,8 @@ gst_audio_decoder_src_query_default (GstAudioDecoder * dec, GstQuery * query)
|
|||
|
||||
/* Refuse BYTES format queries. If it made sense to
|
||||
* answer them, upstream would have already */
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
|
||||
if (format == GST_FORMAT_BYTES) {
|
||||
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
||||
break;
|
||||
|
@ -2785,7 +2787,6 @@ gst_audio_decoder_src_query_default (GstAudioDecoder * dec, GstQuery * query)
|
|||
"query %p: our time: %" GST_TIME_FORMAT, query, GST_TIME_ARGS (time));
|
||||
|
||||
/* and convert to the final format */
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
||||
format, &value)))
|
||||
break;
|
||||
|
|
|
@ -1617,6 +1617,8 @@ gst_video_decoder_src_query_default (GstVideoDecoder * dec, GstQuery * query)
|
|||
|
||||
/* Refuse BYTES format queries. If it made sense to
|
||||
* answer them, upstream would have already */
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
|
||||
if (format == GST_FORMAT_BYTES) {
|
||||
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
||||
break;
|
||||
|
@ -1632,7 +1634,6 @@ gst_video_decoder_src_query_default (GstVideoDecoder * dec, GstQuery * query)
|
|||
"query %p: our time: %" GST_TIME_FORMAT, query, GST_TIME_ARGS (time));
|
||||
|
||||
/* and convert to the final format */
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
||||
format, &value)))
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue