Commit 62d6f5c7 authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey

tsdemux: Properly error out on jp2k parsing errors

Avoids crashes later on where we assume buffer exists
parent 63c582d6
......@@ -2842,6 +2842,10 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream,
}
} else if (bs->stream_type == GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K) {
buffer = parse_jp2k_access_unit (stream);
if (!buffer) {
res = GST_FLOW_ERROR;
goto beach;
}
} else {
buffer = gst_buffer_new_wrapped (stream->data, stream->current_size);
}
......@@ -2878,6 +2882,10 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream,
}
} else if (bs->stream_type == GST_MPEGTS_STREAM_TYPE_VIDEO_JP2K) {
buffer = parse_jp2k_access_unit (stream);
if (!buffer) {
res = GST_FLOW_ERROR;
goto beach;
}
} else {
buffer = gst_buffer_new_wrapped (stream->data, stream->current_size);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment