From 3b42d6505cfd473b787b0b9b1a5df1bf1dff3aaf Mon Sep 17 00:00:00 2001 From: Frankenstone Date: Fri, 1 Mar 2019 18:34:51 +0100 Subject: [PATCH] reduce ffmpeg warnings part 2 , thx DboxOldie - part 1 see here ff91a9a Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3badd9110ac910012dcccec17dbba8daafaf24f4 Author: Frankenstone Date: 2019-03-01 (Fri, 01 Mar 2019) --- src/driver/audiodec/ffmpegdec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index d61566845..3dadd2924 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -405,7 +405,11 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, fprintf(stderr,"%s: PCM write error (%s).\n", ProgName, strerror(errno)); Status=WRITE_ERR; } +#if (LIBAVUTIL_VERSION_MAJOR < 54) pts = av_frame_get_best_effort_timestamp(frame); +#else + pts = frame->best_effort_timestamp; +#endif if (!start_pts) start_pts = pts; }