[FFmpeg-devel] [PATCH] avformat/utils: Preserve AV_PKT_FLAG_CORRUPT

Michael Niedermayer michael at niedermayer.cc
Fri Mar 19 15:52:57 EET 2021


On Thu, Mar 18, 2021 at 02:57:59PM -0600, Pavel Koshevoy wrote:
> On Thu, Mar 18, 2021 at 2:51 PM Marton Balint <cus at passwd.hu> wrote:
> 
> >
> >
> > On Wed, 17 Mar 2021, Pavel Koshevoy wrote:
> >
> > > Preserve AV_PKT_FLAG_CORRUPT so the caller can decide whether to drop
> > > the packet.
> >
> > LGTM, but Michael was against it last time:
> >
> >
> > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20181009233214.8785-2-cus@passwd.hu/
> >
> >
> >
> 
> I have a source where a corrupt packet is able to poison the video decoder
> so that the subsequent video is decoded with severe visual artifacts. 

Why dont you fix the video decoder?
Note, if droping packets works better in general there is a bug in the video
decoders handling of it. 


> My workaround 
> is to detect corrupt packets, drop them and  re-create the video
> decoder on the next non-corrupt packet.  This workaround is working well so
> far.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210319/0aa05fa3/attachment.sig>


More information about the ffmpeg-devel mailing list