[FFmpeg-devel] [PATCH]lavf/mov: Set display aspect ratio for avid dv

Michael Niedermayer michael at niedermayer.cc
Tue Mar 1 20:55:16 CET 2016


On Tue, Mar 01, 2016 at 10:46:17AM +0100, Carl Eugen Hoyos wrote:
> On Monday 29 February 2016 01:44:13 pm Michael Niedermayer wrote:
> > On Mon, Feb 29, 2016 at 11:52:24AM +0100, Carl Eugen Hoyos wrote:
> > > Hi!
> > >
> > > Attached patch fixes ticket #5271 for me.
> > >
> > > Please comment, Carl Eugen
> > >
> > >  mov.c |    5 +++++
> > >  1 file changed, 5 insertions(+)
> > > ef08b944e3cb77bd7311187ecbfbdae719147d92  patchaviddv.diff
> > > diff --git a/libavformat/mov.c b/libavformat/mov.c
> > > index 043f4a9..888b2ad 100644
> > > --- a/libavformat/mov.c
> > > +++ b/libavformat/mov.c
> > > @@ -1461,6 +1461,11 @@ static int mov_read_ares(MOVContext *c,
> > > AVIOContext *pb, MOVAtom atom) if (avio_rb16(pb) == 0xd4d)
> > >                  codec->width = 1440;
> > >              return 0;
> > > +        } else if (codec->codec_tag == MKTAG('A', 'V', 'd', '1') &&
> > > +                   atom.size >= 24) {
> > > +            avio_skip(pb, 12);
> > > +           
> > > c->fc->streams[c->fc->nb_streams-1]->display_aspect_ratio.num =
> > > avio_rb32(pb);
> > >
> > > +           
> > > c->fc->streams[c->fc->nb_streams-1]->display_aspect_ratio.den =
> > > avio_rb32(pb) * avio_rb32(pb);
> >
> > probably not wrong but i would use a temporary variable here
> > one also could check for integer overflow then
> 
> New patch attached.
> 
> Please comment, Carl Eugen

probably ok

[...]

-- 
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/20160301/fae2af5f/attachment.sig>


More information about the ffmpeg-devel mailing list