diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-05-03 00:33:59 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-05-03 00:33:59 +0800 |
commit | da104360ea7d7861aa9fe6dc04b776a1eaf794ec (patch) | |
tree | ffe0f953b130ee5271d3fc2a4eebadfccc03e924 | |
parent | 7d54749f5ada25cf2480e808d669974da35db8c4 (diff) | |
download | freebsd-ports-gnome-da104360ea7d7861aa9fe6dc04b776a1eaf794ec.tar.gz freebsd-ports-gnome-da104360ea7d7861aa9fe6dc04b776a1eaf794ec.tar.zst freebsd-ports-gnome-da104360ea7d7861aa9fe6dc04b776a1eaf794ec.zip |
net/freeswitch: unbreak with ffmpeg 4.0
avcodec.c:194:40: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
^
avformat.c:471:14: error: use of undeclared identifier 'CODEC_FLAG_LOOP_FILTER'
c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop
^
avformat.c:477:47: error: use of undeclared identifier 'ME_HEX'
av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0);
^
avformat.c:553:15: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
^
avformat.c:638:31: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE'
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
^
PR: 227726
Reported by: antoine (via exp-run)
-rw-r--r-- | net/freeswitch/Makefile | 1 | ||||
-rw-r--r-- | net/freeswitch/files/patch-ffmpeg4 | 63 |
2 files changed, 63 insertions, 1 deletions
diff --git a/net/freeswitch/Makefile b/net/freeswitch/Makefile index 04770cad6d75..fdc1f600eb2a 100644 --- a/net/freeswitch/Makefile +++ b/net/freeswitch/Makefile @@ -64,7 +64,6 @@ ENGLISH_DESC= US English Language Sounds FRENCH_DESC= French Canadian Language Sounds RUSSIAN_DESC= Russian Language Sounds -ALL_MODULES_BROKEN= fails to build with ffmpeg 4.0 ALL_MODULES_BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa \ ${LOCALBASE}/bin/aclocal:devel/automake ALL_MODULES_CONFLICTS_BUILD= apr diff --git a/net/freeswitch/files/patch-ffmpeg4 b/net/freeswitch/files/patch-ffmpeg4 new file mode 100644 index 000000000000..ae97aba8c67f --- /dev/null +++ b/net/freeswitch/files/patch-ffmpeg4 @@ -0,0 +1,63 @@ +avcodec.c:194:40: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE' +static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; + ^ +avformat.c:471:14: error: use of undeclared identifier 'CODEC_FLAG_LOOP_FILTER' + c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop + ^ +avformat.c:477:47: error: use of undeclared identifier 'ME_HEX' + av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0); + ^ +avformat.c:553:15: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER' + c->flags |= CODEC_FLAG_GLOBAL_HEADER; + ^ +avformat.c:638:31: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE' + if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { + ^ + +--- src/mod/applications/mod_av/avcodec.c.orig 2017-07-13 12:07:30 UTC ++++ src/mod/applications/mod_av/avcodec.c +@@ -191,7 +191,7 @@ typedef struct h264_codec_context_s { + int hw_encoder; + } h264_codec_context_t; + +-static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 }; ++static uint8_t ff_input_buffer_padding[AV_INPUT_BUFFER_PADDING_SIZE] = { 0 }; + + static switch_status_t buffer_h264_nalu(h264_codec_context_t *context, switch_frame_t *frame) + { +--- src/mod/applications/mod_av/avformat.c.orig 2017-07-13 12:07:30 UTC ++++ src/mod/applications/mod_av/avformat.c +@@ -468,13 +468,13 @@ GCC_DIAG_ON(deprecated-declarations) + c->ticks_per_frame = 2; + + +- c->flags|=CODEC_FLAG_LOOP_FILTER; // flags=+loop ++ c->flags|=AV_CODEC_FLAG_LOOP_FILTER; // flags=+loop + c->me_cmp|= 1; // cmp=+chroma, where CHROMA = 1 + c->me_range = 16; // me_range=16 + c->max_b_frames = 3; // bf=3 + + av_opt_set_int(c->priv_data, "b_strategy", 1, 0); +- av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0); ++ av_opt_set(c->priv_data, "motion_est", "hex", 0); + av_opt_set_int(c->priv_data, "coder", 1, 0); + + switch (mm->vprofile) { +@@ -550,7 +550,7 @@ GCC_DIAG_ON(deprecated-declarations) + + /* Some formats want stream headers to be separate. */ + if (fc->oformat->flags & AVFMT_GLOBALHEADER) { +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + } + + return SWITCH_STATUS_SUCCESS; +@@ -635,7 +635,7 @@ GCC_DIAG_ON(deprecated-declarations) + mst->frame->format = AV_SAMPLE_FMT_S16; + mst->frame->channel_layout = c->channel_layout; + +- if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) { ++ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) { + mst->frame->nb_samples = 10000; + } else { + mst->frame->nb_samples = c->frame_size; |