fix build on libavtools < 12
parent
9beb5cee3a
commit
050868fad1
|
@ -40,6 +40,7 @@ extern "C" {
|
|||
#include <libavutil/mathematics.h>
|
||||
#include <libavutil/avstring.h>
|
||||
#include "libavutil/audio_fifo.h"
|
||||
#include "libavutil/pixfmt.h"
|
||||
|
||||
/* LIBAVUTIL_VERSION_CHECK checks for the right version of libav and FFmpeg
|
||||
* The original source is vlc (in modules/codec/avcodec/avcommon_compat.h)
|
||||
|
@ -321,6 +322,7 @@ void zm_dump_codecpar(const AVCodecParameters *par);
|
|||
frame->pts \
|
||||
);
|
||||
|
||||
#if LIBAVUTIL_VERSION_CHECK(54, 4, 0, 74, 100)
|
||||
#define zm_dump_video_frame(frame,text) Debug(1, "%s: format %d %s %dx%d linesize:%dx%d pts: %" PRId64, \
|
||||
text, \
|
||||
frame->format, \
|
||||
|
@ -331,6 +333,18 @@ void zm_dump_codecpar(const AVCodecParameters *par);
|
|||
frame->pts \
|
||||
);
|
||||
|
||||
#else
|
||||
#define zm_dump_video_frame(frame,text) Debug(1, "%s: format %d %s %dx%d linesize:%dx%d pts: %" PRId64, \
|
||||
text, \
|
||||
frame->format, \
|
||||
"unsupported", \
|
||||
frame->width, \
|
||||
frame->height, \
|
||||
frame->linesize[0], frame->linesize[1], \
|
||||
frame->pts \
|
||||
);
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
|
||||
#define zm_av_packet_unref( packet ) av_packet_unref( packet )
|
||||
#define zm_av_packet_ref( dst, src ) av_packet_ref( dst, src )
|
||||
|
|
Loading…
Reference in New Issue