mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
Check for NULL buffers before chaining/pushing them to the next element.
Original commit message from CVS: Check for NULL buffers before chaining/pushing them to the next element. NULL buffers happen on EOS. gst_bin_iterate now returns a gboolean indicating something usefull happened. It the bin is EOS, it returns FALSE.
This commit is contained in:
parent
7ce56f5dab
commit
5c27fa2ac4
2 changed files with 3 additions and 3 deletions
|
@ -785,7 +785,7 @@ gst_bin_iterate_func (GstBin *bin)
|
|||
fprintf(stderr, "error, no getfunc in \"%s\"\n", gst_element_get_name (entry));
|
||||
else
|
||||
buf = (GST_REAL_PAD(pad)->getfunc)(pad);
|
||||
gst_pad_push(pad,buf);
|
||||
if (buf) gst_pad_push(pad,buf);
|
||||
}
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ gst_bin_chain_wrapper (int argc,char *argv[])
|
|||
GST_DEBUG (0,"pulling a buffer from %s:%s\n", name, gst_pad_get_name (pad));
|
||||
buf = gst_pad_pull (pad);
|
||||
GST_DEBUG (0,"calling chain function of %s:%s\n", name, gst_pad_get_name (pad));
|
||||
GST_RPAD_CHAINFUNC(realpad) (pad,buf);
|
||||
if (buf) GST_RPAD_CHAINFUNC(realpad) (pad,buf);
|
||||
GST_DEBUG (0,"calling chain function of %s:%s done\n", name, gst_pad_get_name (pad));
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ gst_bin_src_wrapper (int argc,char *argv[])
|
|||
// }
|
||||
|
||||
GST_DEBUG (0,"calling gst_pad_push on pad %s:%s\n",GST_DEBUG_PAD_NAME(realpad));
|
||||
gst_pad_push ((GstPad*)realpad, buf);
|
||||
if (buf) gst_pad_push ((GstPad*)realpad, buf);
|
||||
}
|
||||
}
|
||||
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element));
|
||||
|
|
Loading…
Reference in a new issue