aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-01-08 19:08:03 -0800
committerChris Robinson <[email protected]>2019-01-08 19:08:03 -0800
commitd7eee032725ed40f42387d25b2caaadce0a54004 (patch)
tree415e187ce5f2f698913fd0f84ba1b66a0d91a633 /examples
parent0763dfa9544e6d1013641d3c76d321e7aab74b7d (diff)
Replace a couple more C-style casts
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index 11ff126d..0375aecc 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -596,9 +596,8 @@ int AudioState::decodeFrame()
mSamplesMax = mDecodedFrame->nb_samples;
}
/* Return the amount of sample frames converted */
- int data_size = swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples,
- (const uint8_t**)mDecodedFrame->data, mDecodedFrame->nb_samples
- );
+ int data_size{swr_convert(mSwresCtx.get(), &mSamples, mDecodedFrame->nb_samples,
+ const_cast<const uint8_t**>(mDecodedFrame->data), mDecodedFrame->nb_samples)};
av_frame_unref(mDecodedFrame.get());
return data_size;