Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
ffmpeg_libs: add avcodec_flush_buffers_func
Browse files Browse the repository at this point in the history
  • Loading branch information
EHfive committed Mar 29, 2019
1 parent 0b397c2 commit e13f2d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/bluetooth/a2dp/ffmpeg_libs.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static const char *avcodec_send_packet_func_name = "avcodec_send_packet";
static const char *avcodec_receive_frame_func_name = "avcodec_receive_frame";
static const char *avcodec_send_frame_func_name = "avcodec_send_frame";
static const char *avcodec_receive_packet_func_name = "avcodec_receive_packet";
static const char *avcodec_flush_buffers_func_name = "avcodec_flush_buffers";
static const char *avcodec_alloc_context3_func_name = "avcodec_alloc_context3";
static const char *avcodec_free_context_func_name = "avcodec_free_context";
static const char *avcodec_open2_func_name = "avcodec_open2";
Expand All @@ -56,6 +57,7 @@ avcodec_send_packet_func_t avcodec_send_packet_func;
avcodec_receive_frame_func_t avcodec_receive_frame_func;
avcodec_send_frame_func_t avcodec_send_frame_func;
avcodec_receive_packet_func_t avcodec_receive_packet_func;
avcodec_flush_buffers_func_t avcodec_flush_buffers_func;
avcodec_alloc_context3_func_t avcodec_alloc_context3_func;
avcodec_free_context_func_t avcodec_free_context_func;
avcodec_open2_func_t avcodec_open2_func;
Expand Down Expand Up @@ -95,6 +97,7 @@ static void libavcodec_unload() {
avcodec_receive_frame_func = NULL;
avcodec_send_frame_func = NULL;
avcodec_receive_packet_func = NULL;
avcodec_flush_buffers_func = NULL;
avcodec_alloc_context3_func = NULL;
avcodec_free_context_func = NULL;
avcodec_open2_func = NULL;
Expand Down Expand Up @@ -136,6 +139,9 @@ static bool libavcodec_load() {
avcodec_receive_packet_func = load_func(libavcodec_h, avcodec_receive_packet_func_name);
if (avcodec_receive_packet_func == NULL)
return false;
avcodec_flush_buffers_func = load_func(libavcodec_h, avcodec_flush_buffers_func_name);
if (avcodec_flush_buffers_func == NULL)
return false;
avcodec_alloc_context3_func = load_func(libavcodec_h, avcodec_alloc_context3_func_name);
if (avcodec_alloc_context3_func == NULL)
return false;
Expand Down
3 changes: 3 additions & 0 deletions src/modules/bluetooth/a2dp/ffmpeg_libs.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ typedef int (*avcodec_send_frame_func_t)(AVCodecContext *avctx, const AVFrame *f

typedef int (*avcodec_receive_packet_func_t)(AVCodecContext *avctx, AVPacket *avpkt);

typedef void (*avcodec_flush_buffers_func_t)(AVCodecContext *avctx);

typedef AVCodecContext *(*avcodec_alloc_context3_func_t)(const AVCodec *codec);

typedef void (*avcodec_free_context_func_t)(AVCodecContext **avctx);
Expand All @@ -56,6 +58,7 @@ extern avcodec_send_packet_func_t avcodec_send_packet_func;
extern avcodec_receive_frame_func_t avcodec_receive_frame_func;
extern avcodec_send_frame_func_t avcodec_send_frame_func;
extern avcodec_receive_packet_func_t avcodec_receive_packet_func;
extern avcodec_flush_buffers_func_t avcodec_flush_buffers_func;
extern avcodec_alloc_context3_func_t avcodec_alloc_context3_func;
extern avcodec_free_context_func_t avcodec_free_context_func;
extern avcodec_open2_func_t avcodec_open2_func;
Expand Down

0 comments on commit e13f2d8

Please sign in to comment.