On 30/07/2017 01:18, Sean McGovern wrote:
> mov_finalize_stsd_codec parses stream information from the ALAC extradata,
> so run it after the extradata processing is completed in mov_read_stsd.
> 
> Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac 
> encoder.
> 
> Adapted from an FFmpeg patch by Hendrik Leppkes <[email protected]>
> 
> Bug-Id: 1072
> ---
>  libavformat/mov.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index e56b8e9..9b3d427 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1857,7 +1857,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext 
> *pb, int entries)
>      if (pb->eof_reached)
>          return AVERROR_EOF;
>  
> -    return mov_finalize_stsd_codec(c, pb, st, sc);
> +    return 0;
>  }
>  
>  static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
> @@ -1911,7 +1911,7 @@ static int mov_read_stsd(MOVContext *c, AVIOContext 
> *pb, MOVAtom atom)
>          return AVERROR(ENOMEM);
>      memcpy(st->codecpar->extradata, sc->extradata[0], sc->extradata_size[0]);
>  
> -    return 0;
> +    return mov_finalize_stsd_codec(c, pb, st, sc);
>  fail:
>      av_freep(&sc->extradata);
>      av_freep(&sc->extradata_size);
> 

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

Reply via email to