[FFmpeg-devel] [PATCH 05/11] flvdec: fix compiler warning for uninitialized variables

Michael Niedermayer michaelni at gmx.at
Sat Dec 31 01:36:29 CET 2011


On Fri, Dec 30, 2011 at 09:08:02PM +0100, Jean First wrote:
> 
> Signed-off-by: Jean First <jeanfirst at gmail.com>
> ---
>  libavformat/flvdec.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> index 57ef061..3b1ab93 100644
> --- a/libavformat/flvdec.c
> +++ b/libavformat/flvdec.c
> @@ -453,7 +453,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
>      int stream_type=-1;
>      int64_t next, pos;
>      int64_t dts, pts = AV_NOPTS_VALUE;
> -    int sample_rate, channels;
> +    int sample_rate = 0;
> +    int channels = 0;

av_unused may be the better choice.
with = 0 and no comment the reader wont know if its used or not

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111231/8ae47633/attachment.asc>


More information about the ffmpeg-devel mailing list