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
9090
9191 int compression;
9292 int width, height, bpp;
93+ int orig_width, orig_height;
9394 int tile_width, tile_height;
9495 int tiles_x, tiles_y, tile_x, tile_y;
9596
@@ -710,8 +711,8 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data, · 614 unmodified lines
710711 }
711712 c->width = bytestream2_get_be32(&bc);
712713 c->height = bytestream2_get_be32(&bc);
713− if (c->width < 16 || c->width > avctx->width ||
714− c->height < 16 || c->height > avctx->height) {
714+ if (c->width < 16 || c->width > c->orig_width ||
715+ c->height < 16 || c->height > c->orig_height) {
715716 av_log(avctx, AV_LOG_ERROR,
716717 "Invalid frame dimensions %dx%d\n",
717718 c->width, c->height);
@@ -875,6 +876,10 @@ static av_cold int g2m_decode_init(AVCodecContext *avctx) · 157 unmodified lines
875876
876877 avctx->pix_fmt = AV_PIX_FMT_RGB24;
877878
879+ // store original sizes and check against those if resize happens
880+ c->orig_width = avctx->width;
881+ c->orig_height = avctx->height;
882+
878883 return 0;
879884 }
880885

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