Merge pull request #2283 from pjsip/riza_dev

#2282: Fix build error when using ffmpeg version 4.x.
This commit is contained in:
Riza Sulistyo 2020-02-18 12:16:52 +07:00 committed by GitHub
commit 1478a35fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -1710,7 +1710,16 @@ static pj_status_t ffmpeg_codec_decode_whole(pjmedia_vid_codec *codec,
* Normally, encoded buffer is allocated more than needed, so lets just
* bzero the input buffer end/pad, hope it will be just fine.
*/
#if LIBAVCODEC_VER_AT_LEAST(56,35)
/* 2015-07-27 - lavc 56.56.100 / 56.35.0 - avcodec.h
* 29d147c / 059a9348
* - Rename FF_INPUT_BUFFER_PADDING_SIZE and FF_MIN_BUFFER_SIZE
* to AV_INPUT_BUFFER_PADDING_SIZE and AV_INPUT_BUFFER_MIN_SIZE.
*/
pj_bzero(avpacket.data+avpacket.size, AV_INPUT_BUFFER_PADDING_SIZE);
#else
pj_bzero(avpacket.data+avpacket.size, FF_INPUT_BUFFER_PADDING_SIZE);
#endif
output->bit_info = 0;
output->timestamp = input->timestamp;