lib/libdvbsub/dvbsubtitle.cpp: fix compil for new ffmpeg version

This commit is contained in:
Jacek Jendrzej
2015-09-07 18:59:03 +02:00
parent b56be92d59
commit 009fcba748

View File

@@ -25,6 +25,12 @@ extern "C" {
#include <driver/framebuffer.h>
#include "Debug.hpp"
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(57, 1, 99)
#define CODEC_DVB_SUB CODEC_ID_DVB_SUBTITLE
#else
#define CODEC_DVB_SUB AV_CODEC_ID_DVB_SUBTITLE
#endif
// Set these to 'true' for debug output:
static bool DebugConverter = true;
@@ -178,7 +184,7 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void)
avcodec = NULL;
avcodec_register_all();
avcodec = avcodec_find_decoder(CODEC_ID_DVB_SUBTITLE);
avcodec = avcodec_find_decoder(CODEC_DVB_SUB);//CODEC_ID_DVB_SUBTITLE or AV_CODEC_ID_DVB_SUBTITLE from 57.1.100
if (!avcodec) {
dbgconverter("cDvbSubtitleConverter: unable to get dvb subtitle codec!\n");
return;