diff mbox series

[FFmpeg-devel] Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streams

Message ID 20200824061816.2058-1-vikasa@nvidia.com
State Accepted
Headers show
Series [FFmpeg-devel] Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streams | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Vikas Agrawal (Engrg-SW) Aug. 24, 2020, 6:18 a.m. UTC
Please review:
It help initialize chroma format and other info properly
Chroma format wasn't correct if I 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 | 3 +++
 1 file changed, 3 insertions(+)

Comments

James Almer Aug. 24, 2020, 6:28 p.m. UTC | #1
On 8/24/2020 3:18 AM, Vikas Agrawal (Engrg-SW) wrote:
> 
> Please review:
> It help initialize chroma format and other info properly
> Chroma format wasn't correct if I 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 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 1532e74d67..4c8598c992 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -2423,6 +2423,9 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
>      case AV_CODEC_ID_VP9:
>          st->need_parsing = AVSTREAM_PARSE_FULL;
>          break;
> +    case AV_CODEC_ID_AV1:
> +        st->need_parsing = AVSTREAM_PARSE_HEADERS;
> +        break;
>      default:
>          break;
>      }

Applied, thanks.
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1532e74d67..4c8598c992 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2423,6 +2423,9 @@  static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
     case AV_CODEC_ID_VP9:
         st->need_parsing = AVSTREAM_PARSE_FULL;
         break;
+    case AV_CODEC_ID_AV1:
+        st->need_parsing = AVSTREAM_PARSE_HEADERS;
+        break;
     default:
         break;
     }