OSDN Git Service

avformat/dsfdec: set bit_rate, fixes duration estimation
authorPaul B Mahol <onemda@gmail.com>
Sun, 1 May 2016 14:16:39 +0000 (16:16 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 1 May 2016 14:16:39 +0000 (16:16 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/dsfdec.c

index a8c78e4..f16b397 100644 (file)
@@ -125,6 +125,7 @@ static int dsf_read_header(AVFormatContext *s)
         return AVERROR_INVALIDDATA;
     }
     st->codecpar->block_align *= st->codecpar->channels;
+    st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * 8LL;
     avio_skip(pb, 4);
 
     /* data chunk */