[FFmpeg-devel] [PATCH] lavf/mov: atom box parsing return eofcause play fail

Michael Niedermayer michael at niedermayer.cc
Fri Dec 8 21:36:35 EET 2017


On Sat, Dec 09, 2017 at 12:06:47AM +0800, Tiejun.Peng wrote:
> yes,  i have checked this case and i have done a lot of tests  with .mp4 file and fate

Please correct me if iam wrong
there are many different atoms/boxes and many functions parsing
them
If any of these return EOF, it has previously been consideered an
error now it can be handled as not an error.

Noone has reviewed most of this code to be safe after the change.
It doesnt crash in fate or with some valid mp4 files

When a parsing function hits EOF it may return EOF.
This can occur in the middle of the function, initializing some but
not all of what it does normally.
Previously this would stop the demuxer and trigger cleanup, after
the change the code continues and may behave badly when it uses half
initialized structures



> 
> ------------------ Original ------------------
> From:  "Michael Niedermayer";<michael at niedermayer.cc>;
> Send time: Friday, Dec 8, 2017 4:42 AM
> To: "FFmpeg development discussions and patches"<ffmpeg-devel at ffmpeg.org>; 
> Subject:  Re: [FFmpeg-devel] [PATCH] lavf/mov: atom box parsing return eofcause play fail
> 
> On Thu, Dec 07, 2017 at 05:47:46PM +0800, tiejun.peng wrote: > fix eof lead to play fail. >  > Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com> > --- >  libavformat/mov.c | 47 ++++++++++++++++++++++++++++++++++++----------- >  1 file changed, 36 insertions(+), 11 deletions(-)  please split the addition of warning messages from the change to EOF behavior did you check that every EOF return case is safe to continue as if no error occured ? That change has quite wide effects possibly unless i misunderstand. [...] --  Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171208/11addac4/attachment.sig>


More information about the ffmpeg-devel mailing list