ports/multimedia/transcode/files/patch-libav-10.patch
Jan Beich f7b5642315 multimedia/transcode: unbreak with ffmpeg 4.0
export_ffmpeg.c:834:24: error: no member named 'lmin' in 'struct AVCodecContext'; did you mean 'qmin'?
    lavc_venc_context->lmin= (int)(FF_QP2LAMBDA * lavc_param_lmin + 0.5);
                       ^~~~
                       qmin
/usr/local/include/libavcodec/avcodec.h:2355:9: note: 'qmin' declared here
    int qmin;
        ^
export_ffmpeg.c:835:24: error: no member named 'lmax' in 'struct AVCodecContext'; did you mean 'qmax'?
    lavc_venc_context->lmax= (int)(FF_QP2LAMBDA * lavc_param_lmax + 0.5);
                       ^~~~
                       qmax
/usr/local/include/libavcodec/avcodec.h:2362:9: note: 'qmax' declared here
    int qmax;
        ^
export_ffmpeg.c:841:24: error: no member named 'rc_strategy' in 'struct AVCodecContext'
    lavc_venc_context->rc_strategy        = lavc_param_vrc_strategy;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:859:24: error: no member named 'rc_qsquish' in 'struct AVCodecContext'
    lavc_venc_context->rc_qsquish         = lavc_param_rc_qsquish;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:860:24: error: no member named 'rc_qmod_amp' in 'struct AVCodecContext'
    lavc_venc_context->rc_qmod_amp        = lavc_param_rc_qmod_amp;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:861:24: error: no member named 'rc_qmod_freq' in 'struct AVCodecContext'
    lavc_venc_context->rc_qmod_freq       = lavc_param_rc_qmod_freq;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:862:24: error: no member named 'rc_eq' in 'struct AVCodecContext'
    lavc_venc_context->rc_eq              = lavc_param_rc_eq;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:866:24: error: no member named 'rc_buffer_aggressivity' in 'struct AVCodecContext'
    lavc_venc_context->rc_buffer_aggressivity= lavc_param_rc_buffer_aggressivity;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:867:24: error: no member named 'rc_initial_cplx' in 'struct AVCodecContext'
    lavc_venc_context->rc_initial_cplx    = lavc_param_rc_initial_cplx;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:875:24: error: no member named 'intra_quant_bias' in 'struct AVCodecContext'
    lavc_venc_context->intra_quant_bias   = lavc_param_ibias;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:876:24: error: no member named 'inter_quant_bias' in 'struct AVCodecContext'
    lavc_venc_context->inter_quant_bias   = lavc_param_pbias;
    ~~~~~~~~~~~~~~~~~  ^
export_ffmpeg.c:1090:37: error: use of undeclared identifier 'CODEC_FLAG_GRAY'
        lavc_venc_context->flags |= CODEC_FLAG_GRAY;
                                    ^
export_ffmpeg.c:1092:37: error: use of undeclared identifier 'CODEC_FLAG_NORMALIZE_AQP'
        lavc_venc_context->flags |= CODEC_FLAG_NORMALIZE_AQP;
                                    ^
export_ffmpeg.c:1110:9: error: use of undeclared identifier 'CODEC_FLAG_INTERLACED_DCT'
        CODEC_FLAG_INTERLACED_DCT : 0;
        ^
export_ffmpeg.c:1112:9: error: use of undeclared identifier 'CODEC_FLAG_INTERLACED_ME'
        CODEC_FLAG_INTERLACED_ME : 0;
        ^
export_ffmpeg.c:1159:37: error: use of undeclared identifier 'CODEC_FLAG_PASS1'
        lavc_venc_context->flags |= CODEC_FLAG_PASS1;
                                    ^
export_ffmpeg.c:1173:37: error: use of undeclared identifier 'CODEC_FLAG_PASS2'
        lavc_venc_context->flags |= CODEC_FLAG_PASS2;
                                    ^
export_ffmpeg.c:1204:39: error: use of undeclared identifier 'CODEC_FLAG_QSCALE'
        lavc_venc_context->flags   |= CODEC_FLAG_QSCALE;
                                      ^
export_ffmpeg.c:1209:24: error: no member named 'me_method' in 'struct AVCodecContext'
    lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
    ~~~~~~~~~~~~~~~~~  ^

PR:		227726
Reported by:	antoine (via exp-run)
Obtained from:	Gentoo
2018-04-30 18:31:42 +00:00

32 lines
1.1 KiB
Diff

--- filter/filter_resample.c
+++ filter/filter_resample.c
@@ -37,6 +37,7 @@
#include "libtc/optstr.h"
#include "libtc/tcavcodec.h"
#include "libtc/tcmodule-plugin.h"
+#include <libavresample/avresample.h>
typedef struct {
@@ -45,7 +46,7 @@ typedef struct {
int bytes_per_sample;
- ReSampleContext *resample_ctx;
+ AVAudioResampleContext *resample_ctx;
} ResamplePrivateData;
static const char resample_help[] = ""
--- import/probe_ffmpeg.c
+++ import/probe_ffmpeg.c
@@ -51,8 +51,8 @@ static void translate_info(const AVFormatContext *ctx, ProbeInfo *info)
info->bitrate = st->codec->bit_rate / 1000;
info->width = st->codec->width;
info->height = st->codec->height;
- if (st->r_frame_rate.num > 0 && st->r_frame_rate.den > 0) {
- info->fps = av_q2d(st->r_frame_rate);
+ if (st->avg_frame_rate.num > 0 && st->avg_frame_rate.den > 0) {
+ info->fps = av_q2d(st->avg_frame_rate);
} else {
/* watch out here */
info->fps = 1.0/av_q2d(st->codec->time_base);