[FFmpeg-devel] [PATCH] Fix segmentation fault when encoding CODEC_ID_PCM_F32BE frames

Måns Rullgård mans
Sat Aug 9 12:59:05 CEST 2008


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> Hi all,
>
> this fixes segfaults in the PCM regression tests.
>
> This seems due to the compiler (gcc 4.2) getting confused by this snippet:
>
>     {
>         int32_t *samples = samples;
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^
>         for(;n>0;n--) {
>             register int32_t v = *samples++ + 0;
>             bytestream_put_be32(&dst, v);
>         }
>     }

The compiler is not confused.  You're simply not initialising the
variable.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list