aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-19 17:49:06 -0800
committerChris Robinson <[email protected]>2022-02-19 17:49:06 -0800
commitd137ee02a83576e046c210b3abdd3bc0a7a6b216 (patch)
treecddb90859b93259270753f79b378878a2fc58428 /examples
parent39708f9831926d5eaa90e5451adf27fe124d4153 (diff)
Constify the AVCodec* returned by avcodec_find_decoder
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index b9739e7b..806ef10c 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -1804,7 +1804,7 @@ int MovieState::streamComponentOpen(unsigned int stream_index)
if(avcodec_parameters_to_context(avctx.get(), mFormatCtx->streams[stream_index]->codecpar))
return -1;
- AVCodec *codec{avcodec_find_decoder(avctx->codec_id)};
+ const AVCodec *codec{avcodec_find_decoder(avctx->codec_id)};
if(!codec || avcodec_open2(avctx.get(), codec, nullptr) < 0)
{
std::cerr<< "Unsupported codec: "<<avcodec_get_name(avctx->codec_id)