mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
msdkdec: vc1: Fix handling of advanced profile elementary stream
Advanced profile elementary streams may not have codec_data always. So make sure we don't do anything with null buffer.
This commit is contained in:
parent
ad6162e99b
commit
1250af8f09
1 changed files with 6 additions and 4 deletions
|
@ -94,10 +94,12 @@ gst_msdkvc1dec_configure (GstMsdkDec * decoder)
|
|||
/* asf advanced profile codec-data has 1 byte in the begining
|
||||
* which is the ASF binding byte. MediaSDK can't recognize this
|
||||
* byte, so discard it */
|
||||
buffer = gst_buffer_copy_region (decoder->input_state->codec_data,
|
||||
GST_BUFFER_COPY_DEEP | GST_BUFFER_COPY_MEMORY, 1,
|
||||
gst_buffer_get_size (decoder->input_state->codec_data) - 1);
|
||||
gst_adapter_push (decoder->adapter, buffer);
|
||||
if (decoder->input_state->codec_data) {
|
||||
buffer = gst_buffer_copy_region (decoder->input_state->codec_data,
|
||||
GST_BUFFER_COPY_DEEP | GST_BUFFER_COPY_MEMORY, 1,
|
||||
gst_buffer_get_size (decoder->input_state->codec_data) - 1);
|
||||
gst_adapter_push (decoder->adapter, buffer);
|
||||
}
|
||||
|
||||
decoder->is_packetized = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue