Commit 039341eb authored by Paul B Mahol's avatar Paul B Mahol

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: 's avatarPaul B Mahol <onemda@gmail.com>
parent dd5aff00
...@@ -255,6 +255,7 @@ static int wv_read_header(AVFormatContext *s) ...@@ -255,6 +255,7 @@ static int wv_read_header(AVFormatContext *s)
st->codec->bits_per_coded_sample = wc->bpp; st->codec->bits_per_coded_sample = wc->bpp;
avpriv_set_pts_info(st, 64, 1, wc->rate); avpriv_set_pts_info(st, 64, 1, wc->rate);
st->start_time = 0; st->start_time = 0;
if (wc->samples != 0xFFFFFFFFu)
st->duration = wc->samples; st->duration = wc->samples;
if (s->pb->seekable) { if (s->pb->seekable) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment