fix ffmpeg compiler warnings, thx DboxOldie

Origin commit data
------------------
Branch: ni/coolstream
Commit: 48882de906
Author: Frankenstone <dampf_acc@online.de>
Date: 2019-02-27 (Wed, 27 Feb 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Frankenstone
2019-02-27 14:14:19 +01:00
committed by vanhofen
parent 74fd978f22
commit 244d1d9447
5 changed files with 19 additions and 4 deletions

View File

@@ -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");

View File

@@ -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)

View File

@@ -68,7 +68,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
@@ -2259,8 +2261,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());

View File

@@ -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
@@ -798,8 +800,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());

View File

@@ -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);