• Marton Balint's avatar
    lavf: add av_guess_frame_sample_aspect_ratio function · 94a9ac12
    Marton Balint authored
    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: 's avatarMarton Balint <cus@passwd.hu>
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    94a9ac12
version.h 2.79 KB