[FFmpeg-devel] [PATCH] rawdec: use av_shrink_packet.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jan 8 16:57:48 CET 2012


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 at gmx.de>
---
 libavformat/rawdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 7d77df1..ad1921d 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -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;
 }
 
-- 
1.7.8.3



More information about the ffmpeg-devel mailing list