[FFmpeg-devel] [PATCH] check an url_fseek in read_dref()

Baptiste Coudurier baptiste.coudurier
Thu Dec 11 01:05:52 CET 2008


Hi Pascal,

Pascal Massimino wrote:
> Hi everybody,
> 
> attached, extra check against weird files.
> 
> skal
> 
> 
> ------------------------------------------------------------------------
> 
> --- libavformat/mov.c	2008-12-10 15:24:17.943700000 -0800
> +++ libavformat/mov.c	2008-12-10 15:27:35.937770000 -0800
> @@ -295,7 +295,10 @@
>                      url_fskip(pb, len);
>              }
>          }
> -        url_fseek(pb, next, SEEK_SET);
> +        if (url_fseek(pb, next, SEEK_SET) != next) {
> +          av_log(c->fc, AV_LOG_ERROR, "mov_read_dref: seek failed!\n");
> +          return -1;
> +        }
>      }
>      return 0;
>  }

Can you share the offending sample by chance ? Is it streamed/pipe input 
? Im asking this because, url_fseek on a file actually uses lseek and 
this function rarely return something different than next.

Does quicktime fail on this file ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer                                  http://www.ffmpeg.org




More information about the ffmpeg-devel mailing list