[FFmpeg-trac] #5102(avcodec:new): Variables used uninitialized in libavcodec/ffv1enc.c

FFmpeg trac at avcodec.org
Tue Dec 22 09:54:30 CET 2015


#5102: Variables used uninitialized in libavcodec/ffv1enc.c
------------------------------------+-----------------------------------
             Reporter:  jeremyhu    |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  minor       |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  ffv1        |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Changes (by cehoyos):

 * keywords:   => ffv1
 * priority:  normal => minor
 * version:  unspecified => git-master


Comment:

 The warning was originally addressed in
 0b23452c01c5f8145de111f09c0e9a7d5bd82068
 When encoding RGB >8 bit, line 453 reads from an uninitialized value:
 {{{
 sample[3][0][x] = a;
 }}}
 sample[3][0][x] will not be used afterwards.
 I suspect this is speed-critical code, a possible workaround would be to
 manually unroll the {{{for (p = 0; p < 3 + s->transparency; p++) {}}} loop
 in line 455 and move the above assignment in the transparency part of the
 unrolled loop. This may still incorrectly trigger the warning though.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5102#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list