[FFmpeg-cvslog] avformat/dsfdec: set bit_rate, fixes duration estimation

Paul B Mahol git at videolan.org
Sun May 1 16:31:09 CEST 2016


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun May  1 16:16:39 2016 +0200| [423a6a0993814e44fa8f34af23f5e9242cd0658a] | committer: Paul B Mahol

avformat/dsfdec: set bit_rate, fixes duration estimation

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=423a6a0993814e44fa8f34af23f5e9242cd0658a
---

 libavformat/dsfdec.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index a8c78e4..f16b397 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list