[FFmpeg-devel] [PATCH] decode.c: Handle 0-size packets in compat_decode
Michael Niedermayer
michael at niedermayer.cc
Wed Jul 5 17:01:12 EEST 2017
On Wed, Jul 05, 2017 at 09:52:55AM +0200, wm4 wrote:
> On Tue, 4 Jul 2017 20:20:38 +0200
> Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
>
> > On 04.07.2017, at 10:42, wm4 <nfxjfg at googlemail.com> wrote:
> > > Not really comfortable with the current patch. Why does it even touch
> > > the compat_decode_partial_size handling path?
> >
> > Because that is the code that gets utterly confused by 0-size packets and breaks everything.
> > For ac3 what happens is that after the first 0-sized packets all following packets fail to decode.
>
> 0-sized packets do not exist in AC3 in particular and have no meaning.
>
> > Probably that means the whole partial_size thing is broken and not robust, but I haven't been able to really understand it.
>
> This is for the mechanism where you passed a packet to the decode API,
> and it only decoded a few bytes of it, and you had to feed the rest of
> the packet to the decoder again next time to get all audio. (Plus
> confusing special cases about some decoders consuming 0 bytes in the
> first call, or
> consuming more bytes than what was provided as input...)
That would be a bug and such bugs where fixed when they where reported.
>
> The new API doesn't have that, and will just require multiple receive
> calls in those cases.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170705/058960d4/attachment.sig>
More information about the ffmpeg-devel
mailing list