summaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 5eea2df..76ef5fb 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) {
OpenPOWER on IntegriCloud