mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 10:29:39 +00:00
avcodec/utils: check sar only when width/height are set
This fixes loosing the perfectly valid SAR when width=height=0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0dceefc5fa
commit
fe43facd65
@ -819,7 +819,8 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
|
||||
if (!frame->sample_aspect_ratio.num)
|
||||
frame->sample_aspect_ratio = avctx->sample_aspect_ratio;
|
||||
|
||||
if (av_image_check_sar(frame->width, frame->height,
|
||||
if (frame->width && frame->height &&
|
||||
av_image_check_sar(frame->width, frame->height,
|
||||
frame->sample_aspect_ratio) < 0) {
|
||||
av_log(avctx, AV_LOG_WARNING, "ignoring invalid SAR: %u/%u\n",
|
||||
frame->sample_aspect_ratio.num,
|
||||
|
Loading…
Reference in New Issue
Block a user