Commit d7804de3 authored by Reimar Döffinger's avatar Reimar Döffinger

cdxl demux: do not create packets with uninitialized data at EOF.

Fixes a failure in cdxl-pal8 test for the valgrind FATE instance.
Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 305e4b35
...@@ -142,6 +142,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -142,6 +142,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
av_free_packet(pkt); av_free_packet(pkt);
return ret; return ret;
} }
av_shrink_packet(pkt, CDXL_HEADER_SIZE + ret);
pkt->stream_index = cdxl->video_stream_index; pkt->stream_index = cdxl->video_stream_index;
pkt->flags |= AV_PKT_FLAG_KEY; pkt->flags |= AV_PKT_FLAG_KEY;
pkt->pos = pos; pkt->pos = pos;
......
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