[FFmpeg-devel] [PATCH] avcodec/mediacodecdec: propagate SAR to h/w frames

Derek Buitenhuis derek.buitenhuis at gmail.com
Tue Mar 20 16:16:36 EET 2018


On 3/19/2018 11:33 PM, Aman Gupta wrote:
> From: Aman Gupta <aman at tmm1.net>
> 
> Allows consumers who are converting hardware buffers
> to OpenGL textures to render the frames at the intended
> display resolution.
> ---
>  libavcodec/mediacodecdec_common.c | 13 +++++++++++++
>  libavcodec/mediacodecdec_common.h |  2 ++
>  2 files changed, 15 insertions(+)

Concept sounds reasonable to me.

> +    } else {
> +        ff_set_sar(avctx, (AVRational){0,1});
> +    }

Wouldn't it be better to use the codecpar or avctx SAR 
here? Anyone trying to do per-frame correct display is
going to hit trouble with a 0:1 SAR...

- Derek


More information about the ffmpeg-devel mailing list