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 queries 1840b02 audio: Don't answer BYTES queries https://bugzilla.gnome.org/show_bug.cgi?id=774484
This commit is contained in:
parent
826eec22f7
commit
e740103669
@ -2769,6 +2769,8 @@ gst_audio_decoder_src_query_default (GstAudioDecoder * dec, GstQuery * query)
|
|||||||
|
|
||||||
/* Refuse BYTES format queries. If it made sense to
|
/* Refuse BYTES format queries. If it made sense to
|
||||||
* answer them, upstream would have already */
|
* answer them, upstream would have already */
|
||||||
|
gst_query_parse_position (query, &format, NULL);
|
||||||
|
|
||||||
if (format == GST_FORMAT_BYTES) {
|
if (format == GST_FORMAT_BYTES) {
|
||||||
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
||||||
break;
|
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));
|
"query %p: our time: %" GST_TIME_FORMAT, query, GST_TIME_ARGS (time));
|
||||||
|
|
||||||
/* and convert to the final format */
|
/* and convert to the final format */
|
||||||
gst_query_parse_position (query, &format, NULL);
|
|
||||||
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
||||||
format, &value)))
|
format, &value)))
|
||||||
break;
|
break;
|
||||||
|
@ -1617,6 +1617,8 @@ gst_video_decoder_src_query_default (GstVideoDecoder * dec, GstQuery * query)
|
|||||||
|
|
||||||
/* Refuse BYTES format queries. If it made sense to
|
/* Refuse BYTES format queries. If it made sense to
|
||||||
* answer them, upstream would have already */
|
* answer them, upstream would have already */
|
||||||
|
gst_query_parse_position (query, &format, NULL);
|
||||||
|
|
||||||
if (format == GST_FORMAT_BYTES) {
|
if (format == GST_FORMAT_BYTES) {
|
||||||
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
|
||||||
break;
|
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));
|
"query %p: our time: %" GST_TIME_FORMAT, query, GST_TIME_ARGS (time));
|
||||||
|
|
||||||
/* and convert to the final format */
|
/* and convert to the final format */
|
||||||
gst_query_parse_position (query, &format, NULL);
|
|
||||||
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
if (!(res = gst_pad_query_convert (pad, GST_FORMAT_TIME, time,
|
||||||
format, &value)))
|
format, &value)))
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user