On Tue, Mar 20, 2018 at 11:44 AM, Aman Gupta <ffm...@tmm1.net> wrote:
> > > On Tue, Mar 20, 2018 at 7:16 AM, Derek Buitenhuis < > derek.buitenh...@gmail.com> wrote: > >> On 3/19/2018 11:33 PM, Aman Gupta wrote: >> > From: Aman Gupta <a...@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... >> > > My intention was to set it to the default value, which I think is actually > 0,0 > > How can I access codecpar here? > I see, it seems this whole if/else is unnecessary. The avctx sar is already set correctly, and the only thing required was to propagate it into the frames with the earlier chunk in the patch. I guess I could leave just the if statement, to override the sar when display-width/height is available (which is only on newer Android OS versions). Aman > > Aman > > >> >> - Derek >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel