Skip to content

Commit

Permalink
h264_omx_aspect
Browse files Browse the repository at this point in the history
  • Loading branch information
gameboym committed Aug 24, 2020
1 parent 6b6b9e5 commit 7e728fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libavcodec/omx.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,15 @@ static av_cold int omx_component_init(AVCodecContext *avctx, const char *role)
CHECK(err);
s->num_out_buffers = out_port_params.nBufferCountActual;

// aspect ratio
OMX_CONFIG_POINTTYPE config;
INIT_STRUCT(config);
config.nPortIndex = s->out_port;
config.nX = avctx->sample_aspect_ratio.num;
config.nY = avctx->sample_aspect_ratio.den;
err = OMX_SetParameter(s->handle, 0x7f00004d, &config);
CHECK(err);

INIT_STRUCT(vid_param_bitrate);
vid_param_bitrate.nPortIndex = s->out_port;
vid_param_bitrate.eControlRate = OMX_Video_ControlRateVariable;
Expand Down

0 comments on commit 7e728fa

Please sign in to comment.