diff options
author | Vignesh Venkatasubramanian <vigneshv-at-google.com@ffmpeg.org> | 2022-05-02 14:36:28 -0700 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2022-05-13 12:45:17 +0530 |
commit | 98ec4261fd75b47a18cedf9f5340c4e94ad9b274 (patch) | |
tree | 3b9b46b37777a1109b390a26e30f52aff2b91d34 /libavformat/av1.c | |
parent | ab05e9a7f277b3eb47b23d2b0a1a90d972b404bd (diff) | |
download | ffmpeg-98ec4261fd75b47a18cedf9f5340c4e94ad9b274.tar.gz |
avformat/av1: Add a parameter to av1c to omit seq header
Add a parameter to omit seq header when generating the av1C atom.
For now, this does not change any behavior. This will be used by a
follow-up patch to add AVIF support.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Diffstat (limited to 'libavformat/av1.c')
-rw-r--r-- | libavformat/av1.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/av1.c b/libavformat/av1.c index 79065d0c9f..b6eaf50627 100644 --- a/libavformat/av1.c +++ b/libavformat/av1.c @@ -395,7 +395,8 @@ int ff_av1_parse_seq_header(AV1SequenceParameters *seq, const uint8_t *buf, int return is_av1c ? 0 : AVERROR_INVALIDDATA; } -int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size) +int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size, + int write_seq_header) { AVIOContext *meta_pb; AV1SequenceParameters seq_params; @@ -485,7 +486,9 @@ int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size) flush_put_bits(&pbc); avio_write(pb, header, sizeof(header)); - avio_write(pb, seq, seq_size); + if (write_seq_header) { + avio_write(pb, seq, seq_size); + } meta_size = avio_get_dyn_buf(meta_pb, &meta); if (meta_size) |