summaryrefslogtreecommitdiff
path: root/libavformat/gifdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-12-01 11:37:18 +0000
committerPaul B Mahol <onemda@gmail.com>2012-12-04 15:21:24 +0000
commit18aaed6475b026f28e47a4635f99d515b40fb5d3 (patch)
treec3374183676d2bd9007bf34b4a0187950e6cb08b /libavformat/gifdec.c
parent0877f64fea111c71ef316e78364fe7f67bf7552c (diff)
downloadffmpeg-18aaed6475b026f28e47a4635f99d515b40fb5d3.tar.gz
gifdec: do not handle timestamps
It is broken, and results will be messed up when seeking. This also fix duration displayed for streams when using -c copy. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/gifdec.c')
-rw-r--r--libavformat/gifdec.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c
index 46eef7ce0a..4f4ce2ca95 100644
--- a/libavformat/gifdec.c
+++ b/libavformat/gifdec.c
@@ -44,8 +44,6 @@ typedef struct GIFDemuxContext {
*/
int min_delay;
int default_delay;
- int total_duration; ///< In hundredths of second.
- int frame_idx;
} GIFDemuxContext;
/**
@@ -190,9 +188,6 @@ static int gif_read_packet(AVFormatContext *s, AVPacket *pkt)
if ((ret = avio_skip(pb, ct_size)) < 0)
return ret;
}
-
- gdc->total_duration = 0;
- gdc->frame_idx = 0;
} else {
avio_seek(pb, -ret, SEEK_CUR);
ret = AVERROR_EOF;
@@ -239,15 +234,11 @@ static int gif_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->flags |= AV_PKT_FLAG_KEY;
pkt->stream_index = 0;
- pkt->pts = gdc->total_duration;
- gdc->total_duration += gdc->delay;
pkt->duration = gdc->delay;
- pkt->dts = gdc->frame_idx;
/* Graphic Control Extension's scope is single frame.
* Remove its influence. */
gdc->delay = gdc->default_delay;
- gdc->frame_idx++;
frame_parsed = 1;
break;