提交 2fd30407 编写于 作者: J jp9000

deps/libff: Fix warnings with FFmpeg 3.0.0+

Fixes warnings with deprecated packet functions (av_free_packet and
av_dup packet, which were replaced by av_packet_unref and av_packet_ref
respectively)
上级 ad31acca
......@@ -28,6 +28,8 @@
#include <assert.h>
#include "ff-compat.h"
static inline void shrink_packet(struct ff_packet *packet, int packet_length)
{
if (packet_length <= packet->base.size) {
......
/*
* Copyright (c) 2016 Hugh Bailey <obs.jim@gmail.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#if LIBAVCODEC_VERSION_MAJOR >= 57
#define av_free_packet av_packet_unref
static inline int av_dup_packet_2(AVPacket *pkt)
{
AVPacket tmp = *pkt;
int ret = av_packet_ref(pkt, &tmp);
av_packet_unref(&tmp);
return ret;
}
#define av_dup_packet av_dup_packet_2
#endif
......@@ -23,6 +23,8 @@
#include <assert.h>
#include "ff-compat.h"
#define DEFAULT_AV_SYNC_TYPE AV_SYNC_VIDEO_MASTER
#define AUDIO_FRAME_QUEUE_SIZE 1
......
......@@ -15,6 +15,7 @@
*/
#include "ff-packet-queue.h"
#include "ff-compat.h"
bool packet_queue_init(struct ff_packet_queue *q)
{
......
......@@ -27,6 +27,8 @@
#include <assert.h>
#include "ff-compat.h"
static bool queue_frame(struct ff_decoder *decoder, AVFrame *frame,
double best_effort_pts)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册