Skip to content
Permalink
Browse files
h264_omx_aspect
  • Loading branch information
gameboym committed Aug 24, 2020
1 parent 6b6b9e5 commit 7e728faef468cc7330fec1ee259d53147602c8af
Showing 1 changed file with 9 additions and 0 deletions.
@@ -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;

0 comments on commit 7e728fa

Please sign in to comment.