mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpeg2dec: Use gst_pad_peer_query() instead of getting the peer pad manually
This commit is contained in:
parent
7fb7129a83
commit
0fa75d404b
1 changed files with 2 additions and 7 deletions
|
@ -1525,17 +1525,12 @@ gst_mpeg2dec_src_query (GstPad * pad, GstQuery * query)
|
|||
case GST_QUERY_POSITION:
|
||||
{
|
||||
GstFormat format;
|
||||
GstPad *peer;
|
||||
gint64 cur;
|
||||
|
||||
/* First, we try to ask upstream, which might know better, especially in
|
||||
* the case of DVDs, with multiple chapter */
|
||||
if ((peer = gst_pad_get_peer (mpeg2dec->sinkpad)) != NULL) {
|
||||
res = gst_pad_query (peer, query);
|
||||
gst_object_unref (peer);
|
||||
if (res)
|
||||
break;
|
||||
}
|
||||
if ((res = gst_pad_peer_query (mpeg2dec->sinkpad, query)))
|
||||
break;
|
||||
|
||||
/* save requested format */
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
|
|
Loading…
Reference in a new issue