[FFmpeg-devel] [PATCH 04/14] avformat/flvenc: remove !size check for audio packets

James Almer jamrial at gmail.com
Mon Dec 16 01:13:43 EET 2024


On 12/14/2024 5:49 PM, Timo Rothenpieler wrote:
> On 14.12.2024 10:16, Anton Khirnov wrote:
>> This could use some explanation.
> 
> I unfortunately don't remember the exact reason, but it ran into this 
> check in normal operation, and empty audio packets are a perfectly valid 
> thing to package.
> I think Opus or something generates them?

The flac encoder generates a side data only packet as the very last 
packet that muxers are meant to use to write initialization data in 
place of the blank extradata generated during the encoder's init().

No idea if other encoders do the same, but afaik the only valid scenario 
for pkt->size == 0 is if pkt->side_data_elems != 0.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241215/4a26ed77/attachment.sig>


More information about the ffmpeg-devel mailing list