mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
media-descriptor-writer: remove condition from inside loop
Only enter the loop if it indeed has a change of doing something
This commit is contained in:
parent
8088d5354b
commit
37a2b6110f
1 changed files with 9 additions and 7 deletions
|
@ -383,13 +383,15 @@ pad_added_cb (GstElement * decodebin, GstPad * pad,
|
|||
gst_pad_sticky_events_foreach (pad,
|
||||
(GstPadStickyEventsForeachFunction) _find_stream_id, writer);
|
||||
|
||||
for (tmp = ((GstMediaDescriptor *) writer)->filenode->streams; tmp;
|
||||
tmp = tmp->next) {
|
||||
snode = tmp->data;
|
||||
if (snode->pad == pad && srcpad != pad) {
|
||||
gst_object_unref (pad);
|
||||
snode->pad = gst_object_ref (srcpad);
|
||||
break;
|
||||
if (srcpad != pad) {
|
||||
for (tmp = ((GstMediaDescriptor *) writer)->filenode->streams; tmp;
|
||||
tmp = tmp->next) {
|
||||
snode = tmp->data;
|
||||
if (snode->pad == pad) {
|
||||
gst_object_unref (pad);
|
||||
snode->pad = gst_object_ref (srcpad);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue