summaryrefslogtreecommitdiffstats
path: root/libavformat/img2dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-25 12:05:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-25 12:05:32 +0200
commita753776ff5d85994952f0abcb77fa49faf76b475 (patch)
treeb49561468d6e20a1d78280e3059b2de1b0a16e70 /libavformat/img2dec.c
parent70fbfd75c39bdb6bfc197348b29ce40c57042925 (diff)
downloadffmpeg-streaming-a753776ff5d85994952f0abcb77fa49faf76b475.zip
ffmpeg-streaming-a753776ff5d85994952f0abcb77fa49faf76b475.tar.gz
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.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