[FFmpeg-devel] [PATCH 4/6] avformat/mov: parse ISO-14496-12 ChannelLayout

Zhao Zhili quinkblack at foxmail.com
Fri Feb 24 20:37:16 EET 2023


On Fri, 2023-02-24 at 10:42 +0100, Tomas Härdin wrote:
> fre 2023-02-24 klockan 20:25 +0800 skrev Zhao Zhili:
> > +        if (!layout) {
> > +            uint8_t positions[64] = {};
> 
> Is there a maximum number of channels defined somewhere? stsd supports
> up to 65535.

AV_CHANNEL_ORDER_NATIVE supports up to 63 different channels.
Patchset v2 adds AVChannelCustom support.

> 
> > +    // stream carries objects
> > +    if (stream_structure & 2) {
> > +        int obj_count = avio_r8(pb);
> > +        av_log(c->fc, AV_LOG_TRACE, "'chnl' with object_count %d\n",
> > obj_count);
> > +    }
> > +
> > +    avio_seek(pb, end, SEEK_SET);
> 
> I feel we should complain loudly if there's bytes not accounted for, at
> least when (stream_structure & 2) == 0

Patchset v2 adds log message when skipping unknown bytes.
After a second thought, I made a mistake that unknown bytes
comes after ChannelLayout belonging to AudioSampleEntryV1,
not inside ChannelLayout. Will drop the check and seek in v3.

class AudioSampleEntryV1(codingname) extends SampleEntry (codingname){
...

ChannelLayout();
// we permit any number of DownMix or DRC boxes:
DownMixInstructions() [];
DRCCoefficientsBasic() [];
...

> 
> The rest I can't say much about
> 
> /Tomas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list