Skip to content

Commit

Permalink
Check avcodec version before using muxer callback
Browse files Browse the repository at this point in the history
  • Loading branch information
kala13x committed Nov 6, 2024
1 parent b9cf5a6 commit f81cc81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/xmedia.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static void clear_cb(xarray_data_t *pArrData)
free(pArrData->pData);
}

#if XMEDIA_AVCODEC_VER_AT_LEAST(5, 7)
#if XMEDIA_AVCODEC_VER_AT_LEAST(59, 24)
static int muxer_cb(void *pCtx, const uint8_t *pData, int nSize)
#else
static int muxer_cb(void *pCtx, uint8_t *pData, int nSize)
Expand Down
2 changes: 1 addition & 1 deletion src/encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef void(*xencoder_stat_cb_t)(void *pUserCtx, const char *pStatus);
typedef void(*xencoder_err_cb_t)(void *pUserCtx, const char *pErrStr);
typedef int(*xencoder_pkt_cb_t)(void *pUserCtx, AVPacket *pPacket);

#if XMEDIA_AVCODEC_VER_AT_LEAST(5, 7)
#if XMEDIA_AVCODEC_VER_AT_LEAST(59, 24)
typedef int(*xmuxer_cb_t)(void *pUserCtx, const uint8_t *pData, int nSize);
#else
typedef int(*xmuxer_cb_t)(void *pUserCtx, uint8_t *pData, int nSize);
Expand Down

0 comments on commit f81cc81

Please sign in to comment.