rawdec: use av_shrink_packet.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 8 Jan 2012 15:56:46 +0000 (16:56 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 9 Jan 2012 10:02:21 +0000 (11:02 +0100)
This fixes reads of uninitialized data by the parser when running
FATE sample h264-conformance/SL1_SVA_B.264.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libavformat/rawdec.c

index 7d77df1..ad1921d 100644 (file)
@@ -122,7 +122,7 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
         av_free_packet(pkt);
         return ret;
     }
-    pkt->size = ret;
+    av_shrink_packet(pkt, ret);
     return ret;
 }