projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a54bdb8
)
Support non-planar float audio.
author
Carl Hetherington
<cth@carlh.net>
Tue, 18 Dec 2012 20:02:32 +0000
(20:02 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 18 Dec 2012 20:02:32 +0000
(20:02 +0000)
src/lib/ffmpeg_decoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg_decoder.cc
b/src/lib/ffmpeg_decoder.cc
index 911714d7b3c31c19876d2aaef8eefbbfcbbb1c93..3c607a7fb260f741392b42d221177e9857a72848 100644
(file)
--- a/
src/lib/ffmpeg_decoder.cc
+++ b/
src/lib/ffmpeg_decoder.cc
@@
-438,7
+438,25
@@
FFmpegDecoder::deinterleave_audio (uint8_t* data, int size)
}
}
}
+ break;
+
+ case AV_SAMPLE_FMT_FLT:
+ {
+ float* p = reinterpret_cast<float*> (data);
+ int sample = 0;
+ int channel = 0;
+ for (int i = 0; i < total_samples; ++i) {
+ audio->data(channel)[sample] = *p++;
+ ++channel;
+ if (channel == _film->audio_channels()) {
+ channel = 0;
+ ++sample;
+ }
+ }
+ }
+ break;
+
case AV_SAMPLE_FMT_FLTP:
{
float* p = reinterpret_cast<float*> (data);