Le quintidi 25 vendémiaire, an CCXXV, James Almer a écrit :
> > Nothing probably, just me not giving it much thought after i couldn't find
> > any sample using cm, in or dar instead of pixels, and assuming the
> > calculations were tailored specifically for sizes in pixels.
> > I manually created some and you're right it seems to work fine with all of
> > them.
> > 
> > Is the attached patch ok?

> > Subject: [PATCH] Partially revert "avformat/matroskadec: set aspect ratio 
> > only
> >  when DisplayWidth and DisplayHeight are in pixels"
> > 
> > The code works just fine regardless of unit, so only make sure DisplayUnit
> > is not "unknown".

> > -            if (track->video.display_unit == 
> > MATROSKA_VIDEO_DISPLAYUNIT_PIXELS) {
> > +            if (track->video.display_unit != 
> > MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN) {
> 
> Alternatively, i could make it check for "less than" rather than "not equal",
> since values that are not defined (5 and above) should be ignored as they are,
> as per the spec guidelines, "unknown".

The logic seems fine, and a range comparison is probably better indeed.

By the way, in this spec:
https://www.matroska.org/technical/specs/index.html
I only see values 0-3, not 4 for unknown. Is there a more authoritative
version of the spec?

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to