projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: remove unused parameter to PlayerVideo::force.
[dcpomatic.git]
/
src
/
lib
/
ffmpeg_file_encoder.cc
diff --git
a/src/lib/ffmpeg_file_encoder.cc
b/src/lib/ffmpeg_file_encoder.cc
index ef02f30c8f1ab17863f17e59de62131310f18caa..57103abc712ab5523fb4c867c28198ed2dc32dcc 100644
(file)
--- a/
src/lib/ffmpeg_file_encoder.cc
+++ b/
src/lib/ffmpeg_file_encoder.cc
@@
-134,7
+134,8
@@
public:
auto frame = av_frame_alloc ();
DCPOMATIC_ASSERT (frame);
auto frame = av_frame_alloc ();
DCPOMATIC_ASSERT (frame);
- int const buffer_size = av_samples_get_buffer_size (0, channels, size, _codec_context->sample_fmt, 0);
+ int line_size;
+ int const buffer_size = av_samples_get_buffer_size (&line_size, channels, size, _codec_context->sample_fmt, 0);
DCPOMATIC_ASSERT (buffer_size >= 0);
auto samples = av_malloc (buffer_size);
DCPOMATIC_ASSERT (buffer_size >= 0);
auto samples = av_malloc (buffer_size);
@@
-169,10
+170,8
@@
public:
}
case AV_SAMPLE_FMT_FLTP:
{
}
case AV_SAMPLE_FMT_FLTP:
{
- float* q = reinterpret_cast<float*> (samples);
for (int i = 0; i < channels; ++i) {
for (int i = 0; i < channels; ++i) {
- memcpy (q, data[i + channel_offset], sizeof(float) * size);
- q += size;
+ memcpy (reinterpret_cast<float*>(static_cast<uint8_t*>(samples) + i * line_size), data[i + channel_offset], sizeof(float) * size);
}
break;
}
}
break;
}
@@
-400,9
+399,8
@@
FFmpegFileEncoder::video (shared_ptr<PlayerVideo> video, DCPTime time)
{
/* All our output formats are video range at the moment */
auto image = video->image (
{
/* All our output formats are video range at the moment */
auto image = video->image (
- bind (&PlayerVideo::force, _
1, _
pixel_format),
+ bind (&PlayerVideo::force, _pixel_format),
VideoRange::VIDEO,
VideoRange::VIDEO,
- Image::Alignment::PADDED,
false
);
false
);