summaryrefslogtreecommitdiff
path: root/libavformat/gifdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-30 16:09:02 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-30 16:09:02 +0000
commit57b00d7ab1e39004831417a94c126d6fad583cbd (patch)
tree57cf840901c9e8464d6d4148018f71df55f31274 /libavformat/gifdec.c
parent2c69fcc2ffe671649e56dc981e9f4cd9d46a61be (diff)
gifdec: remove width and height from demuxer context
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/gifdec.c')
-rw-r--r--libavformat/gifdec.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c
index f566239098..706bc5a15a 100644
--- a/libavformat/gifdec.c
+++ b/libavformat/gifdec.c
@@ -32,8 +32,6 @@
typedef struct GIFDemuxContext {
const AVClass *class;
- uint32_t width;
- uint32_t height;
/**
* Time span in hundredths of second before
* the next frame should be drawn on screen.
@@ -79,17 +77,17 @@ static int gif_read_header(AVFormatContext *s)
GIFDemuxContext *gdc = s->priv_data;
AVIOContext *pb = s->pb;
AVStream *st;
- int ret;
+ int width, height, ret;
/* skip 6-byte magick */
if ((ret = avio_skip(pb, 6)) < 0)
return ret;
gdc->delay = gdc->default_delay;
- gdc->width = avio_rl16(pb);
- gdc->height = avio_rl16(pb);
+ width = avio_rl16(pb);
+ height = avio_rl16(pb);
- if (gdc->width == 0 || gdc->height == 0)
+ if (width == 0 || height == 0)
return AVERROR_INVALIDDATA;
st = avformat_new_stream(s, NULL);
@@ -101,8 +99,8 @@ static int gif_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_GIF;
- st->codec->width = gdc->width;
- st->codec->height = gdc->height;
+ st->codec->width = width;
+ st->codec->height = height;
/* jump to start because gif decoder needs header data too */
if (avio_seek(pb, 0, SEEK_SET) != 0)