diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-09-15 16:01:48 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-09-15 16:01:48 +0000 |
commit | 00256ae0a9c829ba1207717f45c2cac384990723 (patch) | |
tree | 9efb5ced58e7d373b125f1293205bb950b6f8a68 /gst | |
parent | dcba7c77ef3f3ee2d5c42fd42bab46c2d50f96e8 (diff) |
gst/multipart/multipartdemux.c: Fix documentation, it is not possible to control the framerate of jpegdec using filte...
Original commit message from CVS:
* gst/multipart/multipartdemux.c: (gst_multipart_demux_chain):
Fix documentation, it is not possible to control the framerate of jpegdec
using filtered caps yet. Fixes #355210.
Return the downstream GstFlowReturn instead of GST_FLOW_OK so that we
stop when there is an error.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/multipart/multipartdemux.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c index c8488e0d..a1a82912 100644 --- a/gst/multipart/multipartdemux.c +++ b/gst/multipart/multipartdemux.c @@ -36,9 +36,9 @@ * <title>Sample pipelines</title> * <para> * Here is a simple pipeline to demux a multipart file muxed with - * #GstMultipartMux containing JPEG frames at a rate of 5 frames per second : + * #GstMultipartMux containing JPEG frames: * <programlisting> - * gst-launch filesrc location=/tmp/test.multipart ! multipartdemux ! jpegdec ! video/x-raw-yuv, framerate=(fraction)5/1 ! ffmpegcolorspace ! ximagesink + * gst-launch filesrc location=/tmp/test.multipart ! multipartdemux ! jpegdec ! ffmpegcolorspace ! ximagesink * </programlisting> * </para> * <para> @@ -477,10 +477,13 @@ gst_multipart_demux_chain (GstPad * pad, GstBuffer * buf) GstMultipartDemux *multipart; GstAdapter *adapter; gint size = 1; + GstFlowReturn res; multipart = GST_MULTIPART_DEMUX (gst_pad_get_parent (pad)); adapter = multipart->adapter; + res = GST_FLOW_OK; + if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT)) { gst_adapter_clear (adapter); } @@ -524,16 +527,20 @@ gst_multipart_demux_chain (GstPad * pad, GstBuffer * buf) } else { GST_BUFFER_TIMESTAMP (outbuf) = -1; } - gst_pad_push (srcpad->pad, outbuf); + res = gst_pad_push (srcpad->pad, outbuf); + if (res != GST_FLOW_OK) + break; } nodata: gst_object_unref (multipart); + if (G_UNLIKELY (size == MULTIPART_DATA_ERROR)) return GST_FLOW_ERROR; if (G_UNLIKELY (size == MULTIPART_DATA_EOS)) return GST_FLOW_UNEXPECTED; - return GST_FLOW_OK; + + return res; } static GstStateChangeReturn |