mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +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:
|
case GST_QUERY_POSITION:
|
||||||
{
|
{
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
GstPad *peer;
|
|
||||||
gint64 cur;
|
gint64 cur;
|
||||||
|
|
||||||
/* First, we try to ask upstream, which might know better, especially in
|
/* First, we try to ask upstream, which might know better, especially in
|
||||||
* the case of DVDs, with multiple chapter */
|
* the case of DVDs, with multiple chapter */
|
||||||
if ((peer = gst_pad_get_peer (mpeg2dec->sinkpad)) != NULL) {
|
if ((res = gst_pad_peer_query (mpeg2dec->sinkpad, query)))
|
||||||
res = gst_pad_query (peer, query);
|
break;
|
||||||
gst_object_unref (peer);
|
|
||||||
if (res)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* save requested format */
|
/* save requested format */
|
||||||
gst_query_parse_position (query, &format, NULL);
|
gst_query_parse_position (query, &format, NULL);
|
||||||
|
|
Loading…
Reference in a new issue