diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-25 14:05:32 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-25 14:05:32 +0400 |
commit | a753776ff5d85994952f0abcb77fa49faf76b475 (patch) | |
tree | b49561468d6e20a1d78280e3059b2de1b0a16e70 /libavformat/img2dec.c | |
parent | 70fbfd75c39bdb6bfc197348b29ce40c57042925 (diff) |
img2dec: dont set start_time/duration to invalid values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 5eea2df4f4..76ef5fb230 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -301,8 +301,10 @@ static int img_read_header(AVFormatContext *s1) s->img_last = last_index; s->img_number = first_index; /* compute duration */ - st->start_time = 0; - st->duration = last_index - first_index + 1; + if (!s->ts_from_file) { + st->start_time = 0; + st->duration = last_index - first_index + 1; + } } if (s1->video_codec_id) { |