[FFmpeg-cvslog] img2dec: dont set start_time/duration to invalid values
Michael Niedermayer
git at videolan.org
Sat May 25 12:15:52 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 25 12:05:32 2013 +0200| [a753776ff5d85994952f0abcb77fa49faf76b475] | committer: Michael Niedermayer
img2dec: dont set start_time/duration to invalid values
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a753776ff5d85994952f0abcb77fa49faf76b475
---
libavformat/img2dec.c | 6 ++++--
1 file 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) {
More information about the ffmpeg-cvslog
mailing list