[FFmpeg-devel] [PATCH] avformat/bit: return early from write_packet if pkt->size is 0

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Thu Feb 26 23:18:54 CET 2015


On 26.02.2015 21:47, Nicolas George wrote:
> L'octidi 8 ventôse, an CCXXIII, Nicolas George a écrit :
>> Last: how come ffmpeg/lavf tries to mux an empty packet?
>
> It comes from that commit:
>
> commit 0957b274e312e985d69cb490bee2a7ff820acaa6
> Author: Anton Khirnov <anton at khirnov.net>
> Date:   2014-04-29 15:06:45 +0200
>
>      lavc: add an option to enable side data-only packets during encoding
>
>      Some encoders (e.g. flac) need to send side data when there is no more
>      data to be output. This enables them to output a packet with no data in
>      it, only side data.
>
> IMHO, the empty packet should not be reaching the demuxers that do not
> expect them, that would change the output. I suggest you check with Anton.

The other muxers handle the empty packet gracefully, so I don't see a problem.

Best regards,
Andreas


More information about the ffmpeg-devel mailing list