diff options
author | Edward Hervey <bilboed@bilboed.com> | 2007-12-16 23:43:46 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2007-12-16 23:43:46 +0000 |
commit | badcd298ccce5c3160046c3160c65cf5c2333712 (patch) | |
tree | b8d5bd60f344690ee897250b4c8e67336e6cbeff /ext/jpeg/gstjpegdec.c | |
parent | 981460c22bfce3bfe9788c7d7e8373bb2dd22e44 (diff) |
ext/jpeg/gstjpegdec.c: Actually drop the buffers which are outside the currently configured segment instead of just e...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
Actually drop the buffers which are outside the currently configured
segment instead of just emitting a WARNING.
Diffstat (limited to 'ext/jpeg/gstjpegdec.c')
-rw-r--r-- | ext/jpeg/gstjpegdec.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index 950dc784..71e505dc 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -993,9 +993,8 @@ gst_jpeg_dec_chain (GstPad * pad, GstBuffer * buf) GST_TIME_ARGS (clip_stop - clip_start)); GST_BUFFER_DURATION (outbuf) = clip_stop - clip_start; } - } else { - GST_WARNING_OBJECT (dec, "Outgoing buffer is outside configured segment"); - } + } else + goto drop_buffer; } GST_LOG_OBJECT (dec, "pushing buffer (ts=%" GST_TIME_FORMAT ", dur=%" @@ -1061,6 +1060,13 @@ alloc_failed: } goto exit; } +drop_buffer: + { + GST_WARNING_OBJECT (dec, "Outgoing buffer is outside configured segment"); + gst_buffer_unref (outbuf); + ret = GST_FLOW_OK; + goto exit; + } } static gboolean |