2018-09-09 16:19:34 +02:00
|
|
|
From 72f2f7047ad35b37002d6210458667a89c301cfe Mon Sep 17 00:00:00 2001
|
|
|
|
From: jbeich <jbeich@FreeBSD.org>
|
|
|
|
Date: Thu, 16 Aug 2018 22:14:20 +0200
|
|
|
|
Subject: [PATCH] mod_av: unbreak with ffmpeg 4.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)
|
|
|
|
|
|
|
|
Downloaded from
|
|
|
|
https://github.com/freebsd/freebsd-ports/commit/da104360ea7d7861aa9fe6dc04b776a1eaf794ec
|
|
|
|
|
|
|
|
Original file
|
|
|
|
https://svnweb.freebsd.org/ports/head/net/freeswitch/files/patch-ffmpeg4?view=markup
|
|
|
|
|
2018-09-30 12:10:06 +02:00
|
|
|
[Bernd: Rebased for freeswitch 1.8.2]
|
2018-09-09 16:19:34 +02:00
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
---
|
|
|
|
src/mod/applications/mod_av/avformat.c | 8 ++++----
|
2018-09-30 12:10:06 +02:00
|
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
2018-09-09 16:19:34 +02:00
|
|
|
|
|
|
|
diff --git a/src/mod/applications/mod_av/avformat.c b/src/mod/applications/mod_av/avformat.c
|
2018-09-30 12:10:06 +02:00
|
|
|
index 84900b601c..2f5c0e8d20 100644
|
2018-09-09 16:19:34 +02:00
|
|
|
--- a/src/mod/applications/mod_av/avformat.c
|
|
|
|
+++ b/src/mod/applications/mod_av/avformat.c
|
2018-09-30 12:10:06 +02:00
|
|
|
@@ -479,13 +479,13 @@ GCC_DIAG_ON(deprecated-declarations)
|
2018-09-09 16:19:34 +02:00
|
|
|
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) {
|
2018-09-30 12:10:06 +02:00
|
|
|
@@ -568,7 +568,7 @@ GCC_DIAG_ON(deprecated-declarations)
|
2018-09-09 16:19:34 +02:00
|
|
|
|
|
|
|
/* 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;
|
|
|
|
}
|
|
|
|
|
2018-09-30 12:10:06 +02:00
|
|
|
mst->active = 1;
|
|
|
|
@@ -660,7 +660,7 @@ GCC_DIAG_ON(deprecated-declarations)
|
2018-09-09 16:19:34 +02:00
|
|
|
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;
|
|
|
|
mst->frame->nb_samples = (mst->frame->sample_rate / 50) * c->channels;
|
|
|
|
} else {
|
|
|
|
--
|
2018-09-30 12:10:06 +02:00
|
|
|
2.19.0
|
|
|
|
|