mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
tsdemux: Properly error out on jp2k parsing errors
Avoids crashes later on where we assume buffer exists
This commit is contained in:
parent
63c582d685
commit
62d6f5c78a
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue