Refactoring debug code

Conflicts:
	libeplayer3-arm/container/container_ffmpeg.c
This commit is contained in:
samsamsam
2019-01-11 18:57:06 +01:00
committed by Thilo Graf
parent 99844a02dd
commit f58a34e220
53 changed files with 1404 additions and 1398 deletions

View File

@@ -153,8 +153,11 @@ static AVCodecContext *wrapped_avcodec_get_context(uint32_t cAVIdx, AVStream *st
avcodec_free_context(&avCodecCtx);
return NULL;
}
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
av_codec_set_pkt_timebase(avCodecCtx, stream->time_base);
#else
avCodecCtx->pkt_timebase = stream->time_base;
#endif
store_avcodec_context(avCodecCtx, cAVIdx, stream->id);
}
@@ -187,3 +190,22 @@ static void wrapped_avcodec_flush_buffers(uint32_t cAVIdx)
}
#endif
}
static void wrapped_register_all(void)
{
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
avcodec_register_all();
av_register_all();
#endif
}
static int64_t wrapped_frame_get_best_effort_timestamp(const AVFrame *frame)
{
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
return av_frame_get_best_effort_timestamp(frame);
#else
return frame->best_effort_timestamp;
#endif
}