Skip to content

Commit 7e728fa

Browse files
committed
h264_omx_aspect
1 parent 6b6b9e5 commit 7e728fa

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

libavcodec/omx.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,15 @@ static av_cold int omx_component_init(AVCodecContext *avctx, const char *role)
508508
CHECK(err);
509509
s->num_out_buffers = out_port_params.nBufferCountActual;
510510

511+
// aspect ratio
512+
OMX_CONFIG_POINTTYPE config;
513+
INIT_STRUCT(config);
514+
config.nPortIndex = s->out_port;
515+
config.nX = avctx->sample_aspect_ratio.num;
516+
config.nY = avctx->sample_aspect_ratio.den;
517+
err = OMX_SetParameter(s->handle, 0x7f00004d, &config);
518+
CHECK(err);
519+
511520
INIT_STRUCT(vid_param_bitrate);
512521
vid_param_bitrate.nPortIndex = s->out_port;
513522
vid_param_bitrate.eControlRate = OMX_Video_ControlRateVariable;

0 commit comments

Comments
 (0)