mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 06:32:36 +00:00
Fixed compile with older versions of libavcodec.
This commit is contained in:
parent
c797e00c1a
commit
e420e32d05
@ -113,15 +113,13 @@ class FfmpegDecoderFactory : public musik::core::sdk::IDecoderFactory {
|
||||
".wav", ".wave", ".aif", ".aiff"
|
||||
};
|
||||
|
||||
const AVCodec* codec = nullptr;
|
||||
void *i = 0;
|
||||
while ((codec = av_codec_iterate(&i))) {
|
||||
if (av_codec_is_decoder(codec)) {
|
||||
const AVCodecDescriptor* descriptor = avcodec_descriptor_get(codec->id);
|
||||
if (descriptor != nullptr && descriptor->type == AVMEDIA_TYPE_AUDIO) {
|
||||
supported.insert(descriptor->id);
|
||||
}
|
||||
AVCodec* codec = av_codec_next(nullptr);
|
||||
while (codec != nullptr) {
|
||||
const AVCodecDescriptor* descriptor = avcodec_descriptor_get(codec->id);
|
||||
if (descriptor != nullptr && descriptor->type == AVMEDIA_TYPE_AUDIO) {
|
||||
supported.insert(descriptor->id);
|
||||
}
|
||||
codec = av_codec_next(codec);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user