[FFmpeg-devel] [PATCH 1/2] avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels
jamrial at gmail.com
Sun Oct 16 16:28:06 EEST 2016
On 10/16/2016 5:58 AM, Nicolas George wrote:
> Le quartidi 24 vendémiaire, an CCXXV, James Almer a écrit :
>> A missing DisplayUnit element or one with the default value of 0 means
>> DisplayWidth and DisplayHeight should be interpreted as pixels.
>> The current code setting st->sample_aspect_ratio is wrong when DisplayUnit
>> is anything else.
> Sorry to react after it was pushed, but: are you sure about the logic?
> Naively, I think that a/b makes sense whatever the unit for a and b, as long
> as it is known and the same: the logic should be applied for all units
> except UNKNOWN. What am I missing?
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
Is the attached patch ok?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1399 bytes
Desc: not available
More information about the ffmpeg-devel