Sample rate is written "as is" in header . Is *should not* be devined by
8. Refer spec.:
http://dsd-guide.com/sites/default/files/white-
papers/DSFFileFormatSpec_E.pdf

After this patch ffprobe will corretly show sample rate for DSF files.

Signed-off-by: Ihar A. Tumashyk <itumas...@gmail.com>
---
 libavformat/dsfdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index ae198b2..3e162ae 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -105,7 +105,7 @@ static int dsf_read_header(AVFormatContext *s)
 
     st->codec->codec_type   = AVMEDIA_TYPE_AUDIO;
     st->codec->channels     = avio_rl32(pb);
-    st->codec->sample_rate  = avio_rl32(pb) / 8;
+    st->codec->sample_rate  = avio_rl32(pb);
 
     switch(avio_rl32(pb)) {
     case 1: st->codec->codec_id = AV_CODEC_ID_DSD_LSBF_PLANAR; break;
-- 
2.1.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to