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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jan 8 17:07:12 CET 2012


On Sun, Jan 08, 2012 at 04:57:48PM +0100, Reimar Döffinger wrote:
> This fixes reads of uninitialized data by the parser when running
> FATE sample h264-conformance/SL1_SVA_B.264.

There is still something wrong with that file:
valgrind --track-origins=yes ./ffmpeg_g -i /data/fate-suite/h264-conformance/SL1_SVA_B.264 -f framemd5 -
[...]
==29887== Use of uninitialised value of size 8
==29887==    at 0x352FC457C1: _itoa_word (in /lib64/libc-2.13.so)
==29887==    by 0x352FC47FDC: vfprintf (in /lib64/libc-2.13.so)
==29887==    by 0x352FCFE57F: __vsnprintf_chk (in /lib64/libc-2.13.so)
==29887==    by 0x352FCFE4B9: __snprintf_chk (in /lib64/libc-2.13.so)
==29887==    by 0x4E4109: framemd5_write_packet (stdio2.h:65)
==29887==    by 0x55120A: av_interleaved_write_frame (utils.c:3516)
==29887==    by 0x43C12C: write_frame (ffmpeg.c:1003)
==29887==    by 0x43C3AD: do_video_out.clone.17 (ffmpeg.c:1545)
==29887==    by 0x43D903: output_packet (ffmpeg.c:2146)
==29887==    by 0x441365: transcode (ffmpeg.c:3009)
==29887==    by 0x4457B8: main (ffmpeg.c:5092)
==29887==  Uninitialised value was created by a stack allocation
==29887==    at 0x95A7C0: avg_h264_qpel4_mc03_mmx2 (h264_qpel_mmx.c:1196)

I have no idea how that could happen, but it is quite an annoyance since
I suspect this is what causes random test failures in MPlayer's
regression tests (and/or makes the md5 for the first frame differ
between MPlayer and FFmpeg).


More information about the ffmpeg-devel mailing list