Commit cdc9e006 authored by Simon Morlat's avatar Simon Morlat

tolerate newest version of ffmpeg by removing deprecated warnings.

parent 161469f7
......@@ -31,6 +31,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ffmpeg-priv.h"
#if LIBAVCODEC_VERSION_MAJOR >= 57
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
#include "ortp/b64.h"
......
......@@ -26,6 +26,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ffmpeg-priv.h"
#if LIBAVCODEC_VERSION_MAJOR >= 57
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
typedef struct {
FILE *file;
char *filename;
......
......@@ -40,6 +40,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define FF_INPUT_BUFFER_PADDING_SIZE 32
#endif
#if LIBAVCODEC_VERSION_MAJOR >= 57
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
#if TARGET_OS_IPHONE
#include <CoreGraphics/CGDataProvider.h>
#include <CoreGraphics/CGImage.h>
......
......@@ -33,6 +33,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mediastreamer2/msticker.h"
#include "rfc2429.h"
#if LIBAVCODEC_VERSION_MAJOR >= 57
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
extern void ms_ffmpeg_check_init(void);
......@@ -698,10 +708,13 @@ static void dec_process_frame(MSFilter *f, mblk_t *inm){
s->input=NULL;
while ( (remain=frame->b_wptr-frame->b_rptr)> 0) {
AVPacket pkt;
av_init_packet(&pkt);
pkt.data = frame->b_rptr;
pkt.size = remain;
len=avcodec_decode_video2(&s->av_context, s->orig, &got_picture,&pkt);
if (len<=0) {
ms_warning("ms_AVdecoder_process: error %i.",len);
ms_filter_notify_no_arg(f,MS_VIDEO_DECODER_DECODING_ERRORS);
......
......@@ -36,6 +36,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "rfc2429.h"
#if LIBAVCODEC_VERSION_MAJOR >= 57
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#endif
#define RATE_CONTROL_MARGIN 15000 /*bits/second*/
#define MS_VIDEOENC_CONF(required_bitrate, bitrate_limit, resolution, fps, cpu, qminvalue) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment