mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-04 14:40:26 +00:00
avformat/mov: parse hvcE box as AV_PKT_DATA_HEVC_CONF side data
The hvcE box carries the HEVCDecoderConfigurationRecord for the Dolby Vision enhancement layer in ISOM-based containers. Store its raw contents as AV_PKT_DATA_HEVC_CONF on the stream's coded side data, mirroring the existing dvcC/dvvC handling.
This commit is contained in:
parent
5f6dff5e7d
commit
2c74d197ee
2 changed files with 31 additions and 0 deletions
|
|
@ -8750,6 +8750,33 @@ static int mov_read_dvcc_dvvc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||
return ff_isom_parse_dvcc_dvvc(c->fc, st, buf, read_size);
|
||||
}
|
||||
|
||||
static int mov_read_hvce(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
{
|
||||
AVStream *st;
|
||||
AVPacketSideData *sd;
|
||||
int ret;
|
||||
|
||||
if (c->fc->nb_streams < 1)
|
||||
return 0;
|
||||
st = c->fc->streams[c->fc->nb_streams - 1];
|
||||
|
||||
if (atom.size < 23 || atom.size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
sd = av_packet_side_data_new(&st->codecpar->coded_side_data,
|
||||
&st->codecpar->nb_coded_side_data,
|
||||
AV_PKT_DATA_HEVC_CONF,
|
||||
atom.size, 0);
|
||||
if (!sd)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
ret = ffio_read_size(pb, sd->data, atom.size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mov_read_lhvc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
{
|
||||
AVStream *st;
|
||||
|
|
@ -9707,6 +9734,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
|
|||
{ MKTAG('d','v','c','C'), mov_read_dvcc_dvvc },
|
||||
{ MKTAG('d','v','v','C'), mov_read_dvcc_dvvc },
|
||||
{ MKTAG('d','v','w','C'), mov_read_dvcc_dvvc },
|
||||
{ MKTAG('h','v','c','E'), mov_read_hvce },
|
||||
{ MKTAG('k','i','n','d'), mov_read_kind },
|
||||
{ MKTAG('S','A','3','D'), mov_read_SA3D }, /* ambisonic audio box */
|
||||
{ MKTAG('S','A','N','D'), mov_read_SAND }, /* non diegetic audio box */
|
||||
|
|
|
|||
|
|
@ -11,4 +11,7 @@ bl_present_flag=1
|
|||
dv_bl_signal_compatibility_id=6
|
||||
dv_md_compression=none
|
||||
[/SIDE_DATA]
|
||||
[SIDE_DATA]
|
||||
side_data_type=HEVC enhancement-layer decoder configuration
|
||||
[/SIDE_DATA]
|
||||
[/STREAM]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue