mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
fix ffmpeg compiler warnings, thx DboxOldie
This commit is contained in:
@@ -171,7 +171,9 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void)
|
|||||||
avctx = NULL;
|
avctx = NULL;
|
||||||
avcodec = NULL;
|
avcodec = NULL;
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
|
#endif
|
||||||
avcodec = avcodec_find_decoder(CODEC_DVB_SUB);//CODEC_ID_DVB_SUBTITLE or AV_CODEC_ID_DVB_SUBTITLE from 57.1.100
|
avcodec = avcodec_find_decoder(CODEC_DVB_SUB);//CODEC_ID_DVB_SUBTITLE or AV_CODEC_ID_DVB_SUBTITLE from 57.1.100
|
||||||
if (!avcodec) {
|
if (!avcodec) {
|
||||||
dbgconverter("cDvbSubtitleConverter: unable to get dvb subtitle codec!\n");
|
dbgconverter("cDvbSubtitleConverter: unable to get dvb subtitle codec!\n");
|
||||||
|
@@ -52,7 +52,9 @@ extern "C" {
|
|||||||
#define av_frame_free avcodec_free_frame
|
#define av_frame_free avcodec_free_frame
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57, 8, 0 ))
|
#if (LIBAVCODEC_VERSION_MAJOR > 55)
|
||||||
|
#define av_free_packet av_packet_unref
|
||||||
|
#else
|
||||||
#define av_packet_unref av_free_packet
|
#define av_packet_unref av_free_packet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -85,8 +87,10 @@ CFfmpegDec::CFfmpegDec(void)
|
|||||||
buffer_size = 0x1000;
|
buffer_size = 0x1000;
|
||||||
buffer = NULL;
|
buffer = NULL;
|
||||||
avc = NULL;
|
avc = NULL;
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
av_register_all();
|
av_register_all();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CFfmpegDec::~CFfmpegDec(void)
|
CFfmpegDec::~CFfmpegDec(void)
|
||||||
|
@@ -67,7 +67,9 @@ extern "C" {
|
|||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57, 8, 0 ))
|
#if (LIBAVCODEC_VERSION_MAJOR > 55)
|
||||||
|
#define av_free_packet av_packet_unref
|
||||||
|
#else
|
||||||
#define av_packet_unref av_free_packet
|
#define av_packet_unref av_free_packet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2152,8 +2154,10 @@ bool CStreamRec::Open(CZapitChannel * channel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//av_log_set_level(AV_LOG_VERBOSE);
|
//av_log_set_level(AV_LOG_VERBOSE);
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||||
av_register_all();
|
av_register_all();
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
|
#endif
|
||||||
avformat_network_init();
|
avformat_network_init();
|
||||||
printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
|
printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
|
||||||
|
|
||||||
|
@@ -60,7 +60,9 @@
|
|||||||
#include <gui/movieplayer.h>
|
#include <gui/movieplayer.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
|
|
||||||
#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 57, 8, 0 ))
|
#if (LIBAVCODEC_VERSION_MAJOR > 55)
|
||||||
|
#define av_free_packet av_packet_unref
|
||||||
|
#else
|
||||||
#define av_packet_unref av_free_packet
|
#define av_packet_unref av_free_packet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -795,8 +797,10 @@ bool CStreamStream::Open()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//av_log_set_level(AV_LOG_VERBOSE);
|
//av_log_set_level(AV_LOG_VERBOSE);
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||||
av_register_all();
|
av_register_all();
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
|
#endif
|
||||||
avformat_network_init();
|
avformat_network_init();
|
||||||
|
|
||||||
printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
|
printf("%s: Open input [%s]....\n", __FUNCTION__, url.c_str());
|
||||||
|
@@ -307,9 +307,10 @@ void CStreamInfo2::probeStreams()
|
|||||||
#ifdef ENABLE_FFMPEG_LOGGING
|
#ifdef ENABLE_FFMPEG_LOGGING
|
||||||
av_log_set_callback(log_callback);
|
av_log_set_callback(log_callback);
|
||||||
#endif
|
#endif
|
||||||
|
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
av_register_all();
|
av_register_all();
|
||||||
|
#endif
|
||||||
AVIOContext *avioc = NULL;
|
AVIOContext *avioc = NULL;
|
||||||
int buffer_size = 188 * 128;
|
int buffer_size = 188 * 128;
|
||||||
unsigned char *buffer = (unsigned char *) av_malloc(buffer_size);
|
unsigned char *buffer = (unsigned char *) av_malloc(buffer_size);
|
||||||
|
Reference in New Issue
Block a user