ports/multimedia/transcode/files/patch-libav-10.patch
Stefan Eßer 9df78543e0 multimedia: Revert removal of transcode and dependent ports
This is a partial revert of commit 60955c0a09 which removed transcode
and ports depending on it for not building with -fno-common.

multimedia/transcode: Revert removal of port

The transcode port has been fixed to build with -fno-common by adding
1 "extern" and 3 "static" keywords to prevent some global symbols to
be defined in multiple files that are linked into one binary.

While here fix a few issues reported by "make stage-qa".

multimedia/dvdrip: remove DEPRECATED
multimedia/mkxvcd: remove DEPRECATED
multimedia/subtitleripper: remove DEPRECATED

While here add TIMESTAMP to distinfo of these ports and make portlint
and portclippy happy.

multimedia/transcode: Add TIMESTAMP to distinfo
2021-05-01 20:48:53 +02: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);