[FFmpeg-devel] [PATCH] add av_shrink_packet

Reimar Döffinger Reimar.Doeffinger
Wed Apr 8 11:29:03 CEST 2009

On Tue, Apr 07, 2009 at 06:02:39PM -0700, Baptiste Coudurier wrote:
> On 4/7/2009 5:49 PM, Michael Niedermayer wrote:
> > and decoders have to deal with nonsense input anyway, throwing such
> > away at demuxer level doesnt feel correct to me
> Well, I tend to agree but this is only good if someone actually fixes
> crashes in decoder...
> > maybe we could set some flag in AVPacket to indicate that a packet is
> > possibly damaged, iam not sure if this would be of any use, but a user
> > application could at least drop such packets if its author thinks its
> > better though i dont really think it is ...
> Well when you know that decoder is not error proof regarding partial
> packets, it certainly is IMHO.

IMO that is not a valid argument, because such a decoder is a major
security issue and needs to be fixed ASAP.
Also the specific case where this matters is nuv, and the decoder
handles partial frames just fine - with one issue though, it always
returns incompletely decoded frames without any indication, this should
probably depend on the value for error concealment, though I am not sure
if there is an existing flag (at least there is a flag missing on how to
handle frames with missing reference frames, I have not yet proposed it
because at least for WMV3 I have not found a way to actually change the
behaviour to dropping them).

More information about the ffmpeg-devel mailing list