Browse Source

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>
tags/n1.1
Paul B Mahol 13 years ago
parent
commit
039341eb43
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/wv.c

+ 2
- 1
libavformat/wv.c View File

@@ -255,7 +255,8 @@ 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;
st->duration = wc->samples;
if (wc->samples != 0xFFFFFFFFu)
st->duration = wc->samples;


if (s->pb->seekable) { if (s->pb->seekable) {
int64_t cur = avio_tell(s->pb); int64_t cur = avio_tell(s->pb);


Loading…
Cancel
Save