[FFmpeg-devel] [PATCHv3] lavf: add av_guess_frame_sample_aspect_ratio function

Joakim Plate elupus at ecce.se
Fri May 18 11:32:47 CEST 2012


>> You have declared function as:
>>
>> AVRational av_guess_sample_aspect_ratio(AVFormatContext *format,
>> AVStream *stream, AVFrame *frame)
>>
>> This makes it hard to use the function if there is no AVFrame. (ie
>> directly after av_find_stream_info).
>
>
> You can use NULL in that case for AVFrame. The function handles it.
>

Yes, but it handles it by not using any codec parameters.
stream->codec->sample_aspect_ratio would be better to use in that
situation.


More information about the ffmpeg-devel mailing list