mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
mpeg2: avoid crash when seeking with debug logs
Move down the debug message when the state of the decoder is verified so the slice header is not NULL.
This commit is contained in:
parent
f1a60ec6a2
commit
d6255be939
1 changed files with 2 additions and 2 deletions
|
@ -1141,8 +1141,6 @@ decode_slice(GstVaapiDecoderMpeg2 *decoder, GstVaapiDecoderUnit *unit)
|
|||
GST_VAAPI_DECODER_CODEC_FRAME(decoder)->input_buffer;
|
||||
GstMapInfo map_info;
|
||||
|
||||
GST_DEBUG("slice %d (%u bytes)", slice_hdr->mb_row, unit->size);
|
||||
|
||||
if (!is_valid_state(decoder, GST_MPEG_VIDEO_STATE_VALID_PIC_HEADERS))
|
||||
return GST_VAAPI_DECODER_STATUS_SUCCESS;
|
||||
|
||||
|
@ -1151,6 +1149,8 @@ decode_slice(GstVaapiDecoderMpeg2 *decoder, GstVaapiDecoderUnit *unit)
|
|||
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
GST_DEBUG("slice %d (%u bytes)", slice_hdr->mb_row, unit->size);
|
||||
|
||||
slice = GST_VAAPI_SLICE_NEW(MPEG2, decoder,
|
||||
(map_info.data + unit->offset), unit->size);
|
||||
gst_buffer_unmap(buffer, &map_info);
|
||||
|
|
Loading…
Reference in a new issue