fix build on old ffmpeg

This commit is contained in:
Isaac Connor 2017-06-14 10:36:08 -04:00
parent 4219bcd1ca
commit b51d885f66
2 changed files with 4 additions and 1 deletions

View File

@ -413,6 +413,7 @@ static void zm_log_fps(double d, const char *postfix) {
Debug(1, "%1.0fk %s", d / 1000, postfix);
}
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
void zm_dump_codecpar ( const AVCodecParameters *par ) {
Debug(1, "Dumping codecpar codec_type(%d) codec_id(%d) codec_tag(%d) width(%d) height(%d)",
par->codec_type,
@ -422,6 +423,7 @@ void zm_dump_codecpar ( const AVCodecParameters *par ) {
par->height
);
}
#endif
void zm_dump_codec ( const AVCodecContext *codec ) {
Debug(1, "Dumping codecpar codec_type(%d) codec_id(%d) width(%d) height(%d)",
@ -432,7 +434,6 @@ void zm_dump_codec ( const AVCodecContext *codec ) {
);
}
/* "user interface" functions */
void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) {
char buf[256];

View File

@ -324,7 +324,9 @@ static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, in
void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output);
void zm_dump_codec ( const AVCodecContext *codec );
#if LIBAVCODEC_VERSION_CHECK(57, 0, 0, 0, 0)
void zm_dump_codecpar ( const AVCodecParameters *par );
#endif
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
#define zm_av_packet_unref( packet ) av_packet_unref( packet )