[FFmpeg-devel] [PATCH] ffmpeg: add -drop_deviant_frames option

Michael Niedermayer michael at niedermayer.cc
Thu Apr 4 00:07:58 EEST 2019


On Wed, Mar 27, 2019 at 08:26:36PM +0530, Gyan wrote:
> Weird. Attached corrected patch.
> 
> Thanks.
> 
> On 27-03-2019 08:19 PM, Moritz Barsnick wrote:
> >On Wed, Mar 27, 2019 at 18:05:32 +0530, Gyan wrote:
> >>+ at item -drop_deviant_frames (@emph{input,per-stream})
> >>+Allows discarding decoded frames whose parameters differ from initialized
> >>+stream parameters. May be useful in
> >>+
> >It looks like this was truncated.
> >
> >Moritz
> >Cheers,
> >_______________________________________________
> >ffmpeg-devel mailing list
> >ffmpeg-devel at ffmpeg.org
> >https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >To unsubscribe, visit link above, or email
> >ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 

>  doc/ffmpeg.texi      |    5 +++++
>  fftools/ffmpeg.c     |   47 +++++++++++++++++++++++++++++++++++++++++++++--
>  fftools/ffmpeg.h     |    3 +++
>  fftools/ffmpeg_opt.c |    5 +++++
>  4 files changed, 58 insertions(+), 2 deletions(-)
> 71a87fe4d8f2efa73a3d2d9845e7aabfb75edce5  0001-ffmpeg-add-drop_deviant_frames-option.patch
> From f39e3d44e1cb8108592d2241e2251d8e1506e031 Mon Sep 17 00:00:00 2001
> From: Gyan Doshi <ffmpeg at gyani.pro>
> Date: Mon, 25 Mar 2019 22:01:07 +0530
> Subject: [PATCH] ffmpeg: add -drop_deviant_frames option
> 
> Decoded frames with changed parameters in inputs expected to be uniform
> may indicate malformed/corrupted packets. Demuxer with flag discardcorrupt
> set may not catch all such packets and neither may decoders with err_detect
> flags set.
> 
> Upon parameter change, AVFilterLink of any filters receiving such frames has
> to be reconfigured, destroying existing filter context. In case of a
> change in audio sample rate, timestamps can go haywire, potentially
> leaving the output stream to be "truncated".
> 
> Added option allows users to avoid sending such deviant frames onwards.
> Default behaviour remains unchanged.
> ---
>  doc/ffmpeg.texi      |  5 +++++
>  fftools/ffmpeg.c     | 47 ++++++++++++++++++++++++++++++++++++++++++--
>  fftools/ffmpeg.h     |  3 +++
>  fftools/ffmpeg_opt.c |  5 +++++
>  4 files changed, 58 insertions(+), 2 deletions(-)

Would it make sense to make this feature available to other applications ?
The awnser here has an effect of the design because
For example if this is implemented in 
libavcodec or libavfilter then other applications could
use such a feature. While if its in ffmpeg then other applications could
not. 

Thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190403/4201ee07/attachment.sig>


More information about the ffmpeg-devel mailing list