Quoting Alexandra Hájková (2015-07-17 14:17:01)
> return INVALIDDATA if Data Object wasn't found
> ---
>  libavformat/asfdec.c | 29 ++++++++++++++++-------------
>  1 file changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
> index 7af3728..7d28f18 100644
> --- a/libavformat/asfdec.c
> +++ b/libavformat/asfdec.c
> @@ -1633,25 +1633,21 @@ static int asf_read_header(AVFormatContext *s)
>      avio_skip(pb, 6); // skip number of header objects and 2 reserved bytes
>      asf->data_reached = 0;
>  
> -    /* 1  is here instead of pb->eof_reached because (when not streaming), 
> Data are skipped
> -     * for the first time,
> -     * Index object is processed and got eof and then seeking back to the 
> Data is performed.
> +    /* Data are skipped for the first time, Index object is processed,
> +     * EOF is reached and then seeking back to the Data is performed.
>       */
> -    while (1) {
> +    while (!pb->eof_reached && !asf->data_reached) {

Doesn't this new condition skip the index now?

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to