Hello,
Thanks for your response.
It's difficult to say if this is a common issue.
I have hundred of thousands of files like this from an editor.

Even the off by one Size is not standart compliant and it would be
incorrect to not report it as an error/warning

My first idea was to allow the user to attempt reading such data but
not as a default behaviour.
The patch is larger than my use case and allow size off by N.

Do you think that it would be better to reduce the patch to a unique
use case: truncated SEI of  picture timing type, off by one size ?

Regards

Le mar. 4 juin 2019 à 08:12, Reimar Döffinger
<reimar.doeffin...@gmx.de> a écrit :
>
>
>
> On 04.06.2019, at 00:21, Antonin Gouzer <antonin.gou...@gmail.com> wrote:
>
> > ---
> > Some codecs editors had miss interpreted the H264 standart and
> > have coded a wrong size in the SEI data.
> > size = SEI size + 1.
> > The SEI data is detected as "truncated"
> > Ex: 
> > https://drive.google.com/file/d/1cNtLwnfPnyJnYqE7OYhU3SCoLRtuXIUM/view?usp=sharing
> > Command:
> > ffprobe -strict experimental -print_format xml -show_frames -read_intervals 
> > %+0.04 truncated.h264
> > This (simple) patch add the possibility to read this false truncated SEI 
> > data.
> > by setting strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL.
> > The error remain logged.
> >
> > Thanks in advance !
> >
>
> > @@ -425,27 +425,28 @@ int ff_h264_sei_decode(H264SEIContext *h, 
> > GetBitContext *gb,
> >         } while (get_bits(gb, 8) == 255);
> >
> >         if (size > get_bits_left(gb) / 8) {
> > -            av_log(logctx, AV_LOG_ERROR, "SEI type %d size %d truncated at 
> > %d\n",
> > +            av_log(avctx, AV_LOG_ERROR, "SEI type %d size %d truncated at 
> > %d\n",
> >                    type, 8*size, get_bits_left(gb));
> > -            return AVERROR_INVALIDDATA;
> > +            if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL)
> > +                return AVERROR_INVALIDDATA;
> >         }
> >         next = get_bits_count(gb) + 8 * size;
>
> This doesn't seem right, shouldn't you adjust "size"?
> Also if this is reasonably common shouldn't we accept at least the exactly 
> off-by-one case at the default settings?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to