diff options
author | Tuomas Virtanen <katajakasa@gmail.com> | 2018-08-02 11:04:30 +0300 |
---|---|---|
committer | Tuomas Virtanen <katajakasa@gmail.com> | 2018-08-02 11:04:30 +0300 |
commit | 77d1376eb33c090379faaf6a27ebb82d269109e1 (patch) | |
tree | 2f7fb2e59d63cd0b90cfd748097fa2ea1d403055 /src/internal/audio | |
parent | 70d966abdba49d2121a92e7b26a0cbceb8bfc5f6 (diff) |
Issue #33: Drop usage of av_frame_get_best_effort_timestamp when deprecated
Patch by @ebachard
Diffstat (limited to 'src/internal/audio')
-rw-r--r-- | src/internal/audio/kitaudio.c | 4 |
1 files changed, 4 insertions, 0 deletions
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
|