git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f990082
)
g2meet: allow size changes within original sizes
author
Vittorio Giovara
<vittorio.giovara@gmail.com>
Tue, 15 Jul 2014 19:22:11 +0000
(15:22 -0400)
committer
Vittorio Giovara
<vittorio.giovara@gmail.com>
Wed, 16 Jul 2014 00:08:16 +0000
(20:08 -0400)
libavcodec/g2meet.c
patch
|
blob
|
history
diff --git
a/libavcodec/g2meet.c
b/libavcodec/g2meet.c
index
456045d
..
c405f38
100644
(file)
--- a/
libavcodec/g2meet.c
+++ b/
libavcodec/g2meet.c
@@
-90,6
+90,7
@@
typedef struct G2MContext {
int compression;
int width, height, bpp;
int compression;
int width, height, bpp;
+ int orig_width, orig_height;
int tile_width, tile_height;
int tiles_x, tiles_y, tile_x, tile_y;
int tile_width, tile_height;
int tiles_x, tiles_y, tile_x, tile_y;
@@
-710,8
+711,8
@@
static int g2m_decode_frame(AVCodecContext *avctx, void *data,
}
c->width = bytestream2_get_be32(&bc);
c->height = bytestream2_get_be32(&bc);
}
c->width = bytestream2_get_be32(&bc);
c->height = bytestream2_get_be32(&bc);
- if (c->width < 16 || c->width >
avctx->
width ||
- c->height < 16 || c->height >
avctx->
height) {
+ if (c->width < 16 || c->width >
c->orig_
width ||
+ c->height < 16 || c->height >
c->orig_
height) {
av_log(avctx, AV_LOG_ERROR,
"Invalid frame dimensions %dx%d\n",
c->width, c->height);
av_log(avctx, AV_LOG_ERROR,
"Invalid frame dimensions %dx%d\n",
c->width, c->height);
@@
-875,6
+876,10
@@
static av_cold int g2m_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_RGB24;
avctx->pix_fmt = AV_PIX_FMT_RGB24;
+ // store original sizes and check against those if resize happens
+ c->orig_width = avctx->width;
+ c->orig_height = avctx->height;
+
return 0;
}
return 0;
}