On 8/19/2020 6:50 AM, ManojGuptaBonda wrote:
> From: Vikas Agarwal <vik...@nvidia.com>
> 
> It allow AV1 header parsing and help initialize chroma format and other
> info properly.
> 
> Chroma format wasn't correct if we use below code:
> 
> avformat_find_stream_info(fmtc, NULL); iVideoStream =
> av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
> eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->
>  format;
> ---
>  libavformat/mov.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 1532e74d67..4d4b5c0f48 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -7615,6 +7615,8 @@ static int mov_read_header(AVFormatContext *s)
>              av_log(s, AV_LOG_VERBOSE, "Forcing full parsing for mp3 
> stream\n");
>              st->need_parsing = AVSTREAM_PARSE_FULL;
>          }
> +        if (st->codecpar->codec_id == AV_CODEC_ID_AV1)
> +            st->need_parsing = AVSTREAM_PARSE_HEADERS;

Could you add this at the end of mov_finalize_stsd_codec() instead?

>      }
>  
>      if (mov->trex_data) {
> 

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to