mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-24 06:56:26 +00:00
mpeg2: ignore empty user-data packets.
Fix tcela-8.bits conformance test.
This commit is contained in:
parent
7af40475d5
commit
6eeb20a953
1 changed files with 9 additions and 0 deletions
|
@ -808,6 +808,15 @@ decode_buffer(GstVaapiDecoderMpeg2 *decoder, GstBuffer *buffer)
|
||||||
gst_adapter_flush(priv->adapter, 4);
|
gst_adapter_flush(priv->adapter, 4);
|
||||||
size -= ofs;
|
size -= ofs;
|
||||||
|
|
||||||
|
if (ofs == 4) {
|
||||||
|
// Ignore empty user-data packets
|
||||||
|
if ((start_code & 0xff) == GST_MPEG_VIDEO_PACKET_USER_DATA)
|
||||||
|
continue;
|
||||||
|
GST_ERROR("failed to get a valid packet (SC: 0x%08x)", start_code);
|
||||||
|
status = GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
buffer = gst_adapter_take_buffer(priv->adapter, ofs - 4);
|
buffer = gst_adapter_take_buffer(priv->adapter, ofs - 4);
|
||||||
buf = GST_BUFFER_DATA(buffer);
|
buf = GST_BUFFER_DATA(buffer);
|
||||||
buf_size = GST_BUFFER_SIZE(buffer);
|
buf_size = GST_BUFFER_SIZE(buffer);
|
||||||
|
|
Loading…
Reference in a new issue