diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index f03ec696d6..198e0fcaa8 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -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; diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 71ee3a01c4..0fdf1c5702 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -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;