History

avformat/vpcc: fix VP9 metadata in FLV and RTMP

In order to send VP9 tracks with FLV or RTMP, the enhanced RTMP specification tells that VPCodecConfigurationRecord, a.k.a. vpcC ISO-BMFF box, must be inserted into a metadata message. However, the function responsible for generating vpcCs currently returns invalid boxes, that are lacking the Version and Flag fields, inherited from FullBox. For some reason, both flags were being added manually in movenc. This patch fixes the issue.

Alessandro Ros committed 3 years ago

Commit 5d84ac51 parent f8503b42 files · +2 −3Browse files

Unified · Split

2 files
  1. libavformat/movenc.c +0 −3
  2. libavformat/vpcc.c +2 −0
libavformat/movenc.c+0−3
@@ -1441,10 +1441,7 @@ static int mov_write_vpcc_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra · 1440 unmodified lines
1441 1441
1442 avio_wb32(pb, 0);1442 avio_wb32(pb, 0);
1443 ffio_wfourcc(pb, "vpcC");1443 ffio_wfourcc(pb, "vpcC");
1444 avio_w8(pb, 1); /* version */
1445 avio_wb24(pb, 0); /* flags */
1446 ff_isom_write_vpcc(s, pb, track->vos_data, track->vos_len, track->par);1444 ff_isom_write_vpcc(s, pb, track->vos_data, track->vos_len, track->par);
1447
1448 return update_size(pb, pos);1445 return update_size(pb, pos);
1449}1446}
1450 1447
libavformat/vpcc.c+2−0
@@ -208,6 +208,8 @@ int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, · 207 unmodified lines
208 if (ret < 0)208 if (ret < 0)
209 return ret;209 return ret;
210 210
211 avio_w8(pb, 1); /* version */
212 avio_wb24(pb, 0); /* flags */
211 avio_w8(pb, vpcc.profile);213 avio_w8(pb, vpcc.profile);
212 avio_w8(pb, vpcc.level);214 avio_w8(pb, vpcc.level);
213 avio_w8(pb, (vpcc.bitdepth << 4) | (vpcc.chroma_subsampling << 1) | vpcc.full_range_flag);215 avio_w8(pb, (vpcc.bitdepth << 4) | (vpcc.chroma_subsampling << 1) | vpcc.full_range_flag);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t