Add method to determine which version of libavcodec is available

This commit is contained in:
trav90
2016-11-27 18:35:56 -06:00
committed by roytam1
parent 8492676d0d
commit f5157f3254
2 changed files with 10 additions and 0 deletions
@@ -25,6 +25,15 @@ public:
return pdm.forget();
}
static bool
GetVersion(uint32_t& aMajor, uint32_t& aMinor)
{
uint32_t version = avcodec_version();
aMajor = (version >> 16) & 0xff;
aMinor = (version >> 8) & 0xff;
return true;
}
FFmpegDecoderModule() {}
virtual ~FFmpegDecoderModule() {}
@@ -20,6 +20,7 @@ AV_FUNC(avcodec_get_edge_width, 0)
AV_FUNC(avcodec_open2, 0)
AV_FUNC(av_init_packet, 0)
AV_FUNC(av_dict_get, 0)
AV_FUNC(avcodec_version, 0)
/* libavutil */
AV_FUNC(av_image_fill_linesizes, 0)