summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-11-11 12:44:41 -0300
committerJames Almer <jamrial@gmail.com>2022-11-17 10:05:49 -0300
commitcb925c0bc059ce54cb6f8d858d43378ec516f548 (patch)
tree83b26f54c6270c4dbb478add051cbe333d7b41e1 /libavformat/movenc.c
parente9a67ababacb0c66481a17f5648b3594789e8914 (diff)
avformat/vpcc: parse bitstream data to get profile and bitdepth
Profile can be derived from values codecpar pixel format only with software formats. For hardware formats, we're forced to parse a frame header to get the required information. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 754f95912a..064b541972 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1375,7 +1375,8 @@ static int mov_write_vpcc_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra
ffio_wfourcc(pb, "vpcC");
avio_w8(pb, 1); /* version */
avio_wb24(pb, 0); /* flags */
- ff_isom_write_vpcc(s, pb, track->par);
+ ff_isom_write_vpcc(s, pb, track->vos_data, track->vos_len, track->par);
+
return update_size(pb, pos);
}
@@ -6033,6 +6034,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
if ((par->codec_id == AV_CODEC_ID_DNXHD ||
par->codec_id == AV_CODEC_ID_H264 ||
par->codec_id == AV_CODEC_ID_HEVC ||
+ par->codec_id == AV_CODEC_ID_VP9 ||
par->codec_id == AV_CODEC_ID_TRUEHD) && !trk->vos_len &&
!TAG_IS_AVCI(trk->tag)) {
/* copy frame to create needed atoms */