History

g2meet: allow size changes within original sizes

Vittorio Giovara committed 12 years ago

Commit 14b4e641 parent f9900821 file · +7 −2Browse files

Unified · Split

libavcodec/g2meet.c+7−2
@@ -90,6 +90,7 @@ typedef struct G2MContext { · 89 unmodified lines
90 90
91 int compression;91 int compression;
92 int width, height, bpp;92 int width, height, bpp;
93 int orig_width, orig_height;
93 int tile_width, tile_height;94 int tile_width, tile_height;
94 int tiles_x, tiles_y, tile_x, tile_y;95 int tiles_x, tiles_y, tile_x, tile_y;
95 96
@@ -710,8 +711,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, · 614 unmodified lines
710 }711 }
711 c->width = bytestream2_get_be32(&bc);712 c->width = bytestream2_get_be32(&bc);
712 c->height = bytestream2_get_be32(&bc);713 c->height = bytestream2_get_be32(&bc);
713 if (c->width < 16 || c->width > avctx->width ||714 if (c->width < 16 || c->width > c->orig_width ||
714 c->height < 16 || c->height > avctx->height) {715 c->height < 16 || c->height > c->orig_height) {
715 av_log(avctx, AV_LOG_ERROR,716 av_log(avctx, AV_LOG_ERROR,
716 "Invalid frame dimensions %dx%d\n",717 "Invalid frame dimensions %dx%d\n",
717 c->width, c->height);718 c->width, c->height);
@@ -875,6 +876,10 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx) · 157 unmodified lines
875 876
876 avctx->pix_fmt = AV_PIX_FMT_RGB24;877 avctx->pix_fmt = AV_PIX_FMT_RGB24;
877 878
879 // store original sizes and check against those if resize happens
880 c->orig_width = avctx->width;
881 c->orig_height = avctx->height;
882
878 return 0;883 return 0;
879}884}
880 885

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t