File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -345,8 +345,10 @@ bool AudioDecoder::SetFile(const std::string &_filename)
345345 }
346346
347347#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
348+ #if LIBAVCODEC_VERSION_MAJOR < 60
348349 if (this ->data ->codec ->capabilities & AV_CODEC_CAP_TRUNCATED)
349350 this ->data ->codecCtx ->flags |= AV_CODEC_FLAG_TRUNCATED;
351+ #endif
350352#else
351353 if (this ->data ->codec ->capabilities & CODEC_CAP_TRUNCATED)
352354 this ->data ->codecCtx ->flags |= CODEC_FLAG_TRUNCATED;
Original file line number Diff line number Diff line change @@ -182,8 +182,10 @@ bool Video::Load(const std::string &_filename)
182182 // Inform the codec that we can handle truncated bitstreams -- i.e.,
183183 // bitstreams where frame boundaries can fall in the middle of packets
184184#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56, 60, 100)
185+ #if LIBAVCODEC_VERSION_MAJOR < 60
185186 if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
186187 this ->dataPtr ->codecCtx ->flags |= AV_CODEC_FLAG_TRUNCATED;
188+ #endif
187189#else
188190 if (codec->capabilities & CODEC_CAP_TRUNCATED)
189191 this ->dataPtr ->codecCtx ->flags |= CODEC_FLAG_TRUNCATED;
You can’t perform that action at this time.
0 commit comments