[FFmpeg-devel] Patch to libavc/opus to create extradata if missing

Jonathan Baudanza jon at jonb.org
Mon Jan 4 00:48:59 EET 2021



On Sun, Jan 3, 2021, at 2:25 PM, Lynne wrote:
> > +    /* Input sample rate (0 = unspecified) */> +    bytestream_put_le32  (&bs, 0);
> Put in 48000 here. Stream copy will preserve extradata, and we don't want to
> generate weird streams, even if our decoder ignores this.
> 
> > +    /* Channel count */> +    bytestream_put_byte  (&bs, codecpar->channels);> +    /* Mapping family */> +    bytestream_put_byte  (&bs, 0x0);
> This will only work for mono and stereo. The decoder will error out if more than
> 2 channels are present. For now maybe error out if the number of channels is greater than 2?

Ok! Sample rate changed to 48000. If codecpar->channels is greater than 2, AVERROR_INVALIDDATA will be returned. Please advise if there is a better error code.

Thanks Lynne! 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ff_rtp_parse_open-builds-Opus-head-in-extradata.patch
Type: application/octet-stream
Size: 2946 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210103/1a40f8e6/attachment.obj>


More information about the ffmpeg-devel mailing list