MCPcopy Create free account
hub / github.com/IENT/YUView / setSampleAspectRatio

Method setSampleAspectRatio

YUViewLib/src/ffmpeg/AVCodecParametersWrapper.cpp:337–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void AVCodecParametersWrapper::setSampleAspectRatio(int num, int den)
338{
339 if (this->libVer.avformat.major == 57 || this->libVer.avformat.major == 58 ||
340 this->libVer.avformat.major == 59 || this->libVer.avformat.major == 60)
341 {
342 auto p = reinterpret_cast<AVCodecParameters_57_58_59_60 *>(param);
343 AVRational ratio;
344 ratio.num = num;
345 ratio.den = den;
346 p->sample_aspect_ratio = ratio;
347 this->sample_aspect_ratio = ratio;
348 }
349}
350
351void AVCodecParametersWrapper::update()
352{

Callers 1

decoderFFmpegMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected