[FFmpeg-devel] [PATCH] lavf/mov: make invalid mdhd time_scale default to 1 instead of erroring out

Michael Niedermayer michael at niedermayer.cc
Sat May 20 01:28:53 EEST 2017


On Wed, May 17, 2017 at 02:58:12PM +0200, Matthieu Bouron wrote:
> On Wed, May 17, 2017 at 01:56:13PM +0200, Matthieu Bouron wrote:
> > On Fri, May 12, 2017 at 11:12:12PM +0200, Michael Niedermayer wrote:
> > > On Thu, May 11, 2017 at 04:33:50PM +0200, Matthieu Bouron wrote:
> > > > Some samples have their metadata track time_scale incorrectly set to 0
> > > > and the check introduced by a398f054fdb9b0f0b5a91c231fba6ce014143f71
> > > > prevents playback of those samples. Setting the time_scale to 1 fixes
> > > > playback.
> > > > ---
> > > >  libavformat/mov.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > should be ok
> > 
> > Do you agree if I extend the patch to apply this behaviour to the mvhd
> > atoms (like a398f054fdb9b0f0b5a91c231fba6ce014143f71 originally did) ?
> 
> Here is an updated version of the patch (which extends the behaviour to
> the mvhd atoms).
> 
> -- 
> Matthieu B.

>  mov.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 00585940d50d3c53c2041566c01fdab5b6003220  0001-lavf-mov-make-invalid-m-d-v-hd-time_scale-default-to.patch
> From 31d808ac885bcf1af1f546a1c8f29b1af82b381b Mon Sep 17 00:00:00 2001
> From: Matthieu Bouron <matthieu.bouron at gmail.com>
> Date: Thu, 11 May 2017 15:16:22 +0200
> Subject: [PATCH] lavf/mov: make invalid m{d,v}hd time_scale default to 1
>  instead of erroring out
> 
> Some samples have their metadata track time_scale incorrectly set to 0
> and the check introduced by a398f054fdb9b0f0b5a91c231fba6ce014143f71
> prevents playback of those samples. Setting the time_scale to 1 fixes
> playback.
> ---
>  libavformat/mov.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

LGTM and seems not breaking anything

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20170520/e082fdf4/attachment.sig>


More information about the ffmpeg-devel mailing list