diff options
author | Luis de Bethencourt <luis.bg@samsung.com> | 2015-03-09 12:51:17 +0000 |
---|---|---|
committer | Luis de Bethencourt <luis.bg@samsung.com> | 2015-03-09 12:51:21 +0000 |
commit | db3ade5bfbad731e4858313f8c1f3efc9b3ac7a1 (patch) | |
tree | c1d6864c8e9b4f9ebc69be8953658aa94998627e /gst | |
parent | f494da89b41a07073d0e86d3a5b2b2368342bb3c (diff) |
matroska: error mode if can't push buffer
If gst_pad_push() fails, inform and return flow error.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/matroska/matroska-parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/matroska/matroska-parse.c b/gst/matroska/matroska-parse.c index 9c8d15a7d..1e86a252c 100644 --- a/gst/matroska/matroska-parse.c +++ b/gst/matroska/matroska-parse.c @@ -2414,7 +2414,7 @@ static GstFlowReturn gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer, gboolean keyframe) { - GstFlowReturn ret = GST_FLOW_OK; + GstFlowReturn ret; if (!parse->pushed_headers) { GstCaps *caps; @@ -2457,7 +2457,11 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer, GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT); - gst_pad_push (parse->srcpad, buf); + ret = gst_pad_push (parse->srcpad, buf); + if (ret != GST_FLOW_OK) { + GST_WARNING_OBJECT (parse, "Failed to push buffer"); + return ret; + } parse->pushed_headers = TRUE; } @@ -2472,9 +2476,8 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer, } else { GST_BUFFER_TIMESTAMP (buffer) = parse->last_timestamp; } - ret = gst_pad_push (parse->srcpad, gst_buffer_ref (buffer)); - return ret; + return gst_pad_push (parse->srcpad, gst_buffer_ref (buffer)); } static GstFlowReturn |