From 77d1376eb33c090379faaf6a27ebb82d269109e1 Mon Sep 17 00:00:00 2001 From: Tuomas Virtanen Date: Thu, 2 Aug 2018 11:04:30 +0300 Subject: Issue #33: Drop usage of av_frame_get_best_effort_timestamp when deprecated Patch by @ebachard --- src/internal/audio/kitaudio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/internal/audio/kitaudio.c') diff --git a/src/internal/audio/kitaudio.c b/src/internal/audio/kitaudio.c index 10dcf63..b1a0fdc 100644 --- a/src/internal/audio/kitaudio.c +++ b/src/internal/audio/kitaudio.c @@ -155,7 +155,11 @@ static void dec_decode_audio_cb(Kit_Decoder *dec, AVPacket *in_packet) { _FindAVSampleFormat(dec->output.format), 1); // Get presentation timestamp +#ifndef FF_API_FRAME_GET_SET pts = av_frame_get_best_effort_timestamp(audio_dec->scratch_frame); +#else + pts = audio_dec->scratch_frame->best_effort_timestamp; +#endif pts *= av_q2d(dec->format_ctx->streams[dec->stream_index]->time_base); // Lock, write to audio buffer, unlock -- cgit v1.2.3