mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
lavc/dvdsubenc: only check canvas size when it is actually set
Fixes #10650
(cherry picked from commit 5230257ea1)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
466799d4f5
commit
111035ccae
1 changed files with 2 additions and 1 deletions
|
|
@ -376,7 +376,8 @@ static int encode_dvd_subtitles(AVCodecContext *avctx,
|
|||
x2 = vrect.x + vrect.w - 1;
|
||||
y2 = vrect.y + vrect.h - 1;
|
||||
|
||||
if (x2 > avctx->width || y2 > avctx->height) {
|
||||
if ((avctx->width > 0 && x2 > avctx->width) ||
|
||||
(avctx->height > 0 && y2 > avctx->height)) {
|
||||
av_log(avctx, AV_LOG_ERROR, "canvas_size(%d:%d) is too small(%d:%d) for render\n",
|
||||
avctx->width, avctx->height, x2, y2);
|
||||
ret = AVERROR(EINVAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue