projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b122a88
)
Hopefully support signed 32-bit planar audio.
author
Carl Hetherington
<cth@carlh.net>
Tue, 15 Mar 2016 11:20:40 +0000
(11:20 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 15 Mar 2016 11:20:40 +0000
(11:20 +0000)
src/lib/ffmpeg_decoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_decoder.cc
b/src/lib/ffmpeg_decoder.cc
index 72845a133eb0b11be7a5cfc307e0d0d5ef4addd4..8f97cb2c16a3f17b5d3b56841b9dfecb5f94efd5 100644
(file)
--- a/
src/lib/ffmpeg_decoder.cc
+++ b/
src/lib/ffmpeg_decoder.cc
@@
-218,6
+218,17
@@
FFmpegDecoder::deinterleave_audio (shared_ptr<FFmpegAudioStream> stream) const
}
break;
+ case AV_SAMPLE_FMT_S32P:
+ {
+ int32_t** p = reinterpret_cast<int32_t **> (_frame->data);
+ for (int i = 0; i < stream->channels(); ++i) {
+ for (int j = 0; j < frames; ++j) {
+ audio->data(i)[j] = static_cast<float>(p[i][j]) / (1 << 31);
+ }
+ }
+ }
+ break;
+
case AV_SAMPLE_FMT_FLT:
{
float* p = reinterpret_cast<float*> (_frame->data[0]);