diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-14 10:37:18 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-14 10:41:16 +0000 |
commit | 039341eb43945f02867cfe2fe2514eaec4b81ace (patch) | |
tree | e6ee52236566989c3251b8d48740af587a34d735 | |
parent | dd5aff001e1e157cf612311a9f44268a930fac4f (diff) | |
download | ffmpeg-039341eb43945f02867cfe2fe2514eaec4b81ace.tar.gz |
wv: do not report invalid stream duration
If total number of samples is -1 it means stream is of unknown length.
Fixes ticket #1777.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/wv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/wv.c b/libavformat/wv.c index 50e5e5383b..8d9184c1ca 100644 --- a/libavformat/wv.c +++ b/libavformat/wv.c @@ -255,7 +255,8 @@ static int wv_read_header(AVFormatContext *s) st->codec->bits_per_coded_sample = wc->bpp; avpriv_set_pts_info(st, 64, 1, wc->rate); st->start_time = 0; - st->duration = wc->samples; + if (wc->samples != 0xFFFFFFFFu) + st->duration = wc->samples; if (s->pb->seekable) { int64_t cur = avio_tell(s->pb); |