[FFmpeg-cvslog] r25931 - trunk/libavformat/asfdec.c

Reimar Döffinger Reimar.Doeffinger
Tue Dec 14 21:41:39 CET 2010


On Tue, Dec 14, 2010 at 12:21:20PM -0800, Baptiste Coudurier wrote:
> >Sorry, I considered it "obvious". The ASF demuxer did not check the
> >get_buffer return value. Thus for the last packet it did not realise
> >only part of the data was read and the last part of the buffer was
> >uninitialized. Then it shaked the whole thing and passed it on to the
> >decoder. You can hardly blame the decoder for reading uninitialized
> >data when it gets a buffer to decode where there's uninitialized data
> >right in the middle. To avoid this issue, the demuxer now throws away
> >any such incomplete packets. I didn't double-check much that this is
> >what really happens, but I didn't see any reason to doubt this...
> 
> I thought we decided that the partial packet had to be demuxed ?
> 
> That is why we have av_shrink_packet, av_grow_packet, and stuff like that...

Only av_shrink_packet is for thatg purpose.

> Did somebody change his mind ?

No. It's just that in this specific case it is a pain to do because the
demuxer needs to juggle the data around and that's not something you
can do if you have only half of it.
And I am too lazy to think about if and when you could still do
something reasonable.



More information about the ffmpeg-cvslog mailing list