MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_set_sar

Function ff_set_sar

libavcodec/utils.c:106–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106int ff_set_sar(AVCodecContext *avctx, AVRational sar)
107{
108 int ret = av_image_check_sar(avctx->width, avctx->height, sar);
109
110 if (ret < 0) {
111 av_log(avctx, AV_LOG_WARNING, "ignoring invalid SAR: %d/%d\n",
112 sar.num, sar.den);
113 avctx->sample_aspect_ratio = (AVRational){ 0, 1 };
114 return ret;
115 } else {
116 avctx->sample_aspect_ratio = sar;
117 }
118 return 0;
119}
120
121int ff_side_data_update_matrix_encoding(AVFrame *frame,
122 enum AVMatrixEncoding matrix_encoding)

Callers 15

aom_decodeFunction · 0.85
dvvideo_decode_frameFunction · 0.85
exr.cFile · 0.85
h264_slice_header_initFunction · 0.85
ff_h263_decode_frameFunction · 0.85
decode_frameFunction · 0.85
libdav1d.cFile · 0.85
theora_decode_headerFunction · 0.85

Calls 2

av_image_check_sarFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected