Skip to content
Snippets Groups Projects
Commit 94a9ac12 authored by Marton Balint's avatar Marton Balint Committed by Michael Niedermayer
Browse files

lavf: add av_guess_frame_sample_aspect_ratio function


Guesses the sample aspect ratio of a frame, based on both the stream and the
frame aspect ratio.

Since the frame aspect ratio is set by the codec but the stream aspect ratio
is set by the demuxer, these two may not be equal. This function tries to
return the value that you should use if you would like to display the frame.

Basic logic is to use the stream aspect ratio if it is set to something sane
otherwise use the frame aspect ratio. This way a container setting, which is
usually easy to modify can override the coded value in the frames.

Signed-off-by: default avatarMarton Balint <cus@passwd.hu>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 9cf5bcde
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment