[FFmpeg-devel] mov/mp4 found_moov variable uninitialized

Baptiste Coudurier baptiste.coudurier
Thu Jun 25 11:13:42 CEST 2009


Hi,

Frank Barchard wrote:
> when opening a mov/mp4 with is_streamed, the following statement stops
> parsing, avoiding unnecessary seeks to end of file
> 
>             if (url_is_streamed(pb) && c->found_moov && c->found_mdat)
>                break;
> 
> 
> but if you close/shutdown and open a new movie, found_mdat is reset to
> 0, but found_moov is not.

What do you mean by "close/shutdown" av_close_input_stream ?
In this case everything is reset.

> [...]
> 
> --- libavformat/mov.orig.c      2009-06-24 23:45:32.099461400 -0700
> +++ libavformat/mov.c   2009-06-24 23:45:37.755675200 -0700
> @@ -1958,6 +1958,7 @@ static int mov_read_packet(AVFormatConte
>      }
>      if (!sample) {
>          mov->found_mdat = 0;
> +        mov->found_moov = 0;
>          if (!url_is_streamed(s->pb) ||
>              mov_read_default(mov, s->pb, (MOVAtom){ 0, 0, INT64_MAX }) < 0

This breaks fragments demuxing.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list