[FFmpeg-devel] [PATCH]Fix error condition in idcin demuxer

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 7 13:08:44 CET 2012


On Sat, Jan 07, 2012 at 12:58:10PM +0100, Carl Eugen Hoyos wrote:
> Hi!
> 
> I believe attached fixes an error condition in the idcin demuxer.
> 
> Please comment, Carl Eugen

> diff --git a/libavformat/idcin.c b/libavformat/idcin.c
> index 878378f..4a062c5 100644
> --- a/libavformat/idcin.c
> +++ b/libavformat/idcin.c
> @@ -266,8 +266,8 @@ static int idcin_read_packet(AVFormatContext *s,
>  
>              pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
>                                            AVPALETTE_SIZE);
> -            if (ret < 0)
> -                return ret;
> +            if (!pal)
> +                return AVERROR(ENOMEM) ;

Looks good to me except for the extra space before the ;


More information about the ffmpeg-devel mailing list