cdxl demux: do not create packets with uninitialized data at EOF.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 26 Feb 2012 22:47:41 +0000 (22:47 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Mon, 5 Mar 2012 21:27:31 +0000 (16:27 -0500)
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
libavformat/cdxl.c

index b056d69..ed795e4 100644 (file)
@@ -142,6 +142,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
             av_free_packet(pkt);
             return ret;
         }
+        av_shrink_packet(pkt, CDXL_HEADER_SIZE + ret);
         pkt->stream_index  = cdxl->video_stream_index;
         pkt->flags        |= AV_PKT_FLAG_KEY;
         pkt->pos           = pos;