[FFmpeg-devel] [PATCH] asfdec: replace a assert by returning AVERROR_INVALIDDATA
Carl Eugen Hoyos
cehoyos
Thu Oct 14 09:56:08 CEST 2010
Thierry Foucu <tfoucu <at> gmail.com> writes:
> Index: libavformat/asfdec.c
> ===================================================================
> --- libavformat/asfdec.c (revision 25471)
> +++ libavformat/asfdec.c (working copy)
> @@ -853,7 +853,10 @@
> //asf->packet_size_left <= asf->packet_padsize) {
> int ret = asf->packet_size_left + asf->packet_padsize;
> //printf("PacketLeftSize:%d Pad:%d Pos:%"PRId64"\n",
> asf->packet_size_left, asf->packet_padsize, url_ftell(pb));
> - assert(ret>=0);
> + //assert(ret>=0);
This comment looks useless.
> + if (ret < 0) {
> + return AVERROR_INVALIDDATA;
> + }
Most developers believe that these braces are unneeded.
Could you upload the sample?
Carl Eugen
More information about the ffmpeg-devel
mailing list