summaryrefslogtreecommitdiff
path: root/libavcodec/gifdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-12-01 12:36:16 +0000
committerPaul B Mahol <onemda@gmail.com>2012-12-02 16:59:11 +0000
commit49435d3888bda5be392665c734bcbe6f09507546 (patch)
tree5e65e4f9aa9ba5206eec95a96ed8c204c9547cfd /libavcodec/gifdec.c
parentddd87236f0ebf4680a3d2ea530224577fe0683d2 (diff)
gifdec: read pixel aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/gifdec.c')
-rw-r--r--libavcodec/gifdec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index dd4bca29bd..3e3c9a5394 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -387,7 +387,11 @@ static int gif_read_header1(GifState *s)
s->has_global_palette = (v & 0x80);
s->bits_per_pixel = (v & 0x07) + 1;
background_color_index = bytestream_get_byte(&s->bytestream);
- bytestream_get_byte(&s->bytestream); /* ignored */
+ n = bytestream_get_byte(&s->bytestream);
+ if (n) {
+ s->avctx->sample_aspect_ratio.num = n + 15;
+ s->avctx->sample_aspect_ratio.den = 64;
+ }
av_dlog(s->avctx, "screen_w=%d screen_h=%d bpp=%d global_palette=%d\n",
s->screen_width, s->screen_height, s->bits_per_pixel,