Skip to content

Commit f1e978b

Browse files
FreezyLemonshssoichiro
authored andcommitted
Remove avresample
The crate never supported any wrappers for it and FFmpeg 5.0 dropped it anyways.
1 parent 144bf17 commit f1e978b

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ codec = ["ffmpeg-sys-the-third/avcodec"]
5858
device = ["ffmpeg-sys-the-third/avdevice", "format"]
5959
filter = ["ffmpeg-sys-the-third/avfilter"]
6060
format = ["ffmpeg-sys-the-third/avformat", "codec"]
61-
resampling = ["ffmpeg-sys-the-third/avresample"]
6261
postprocessing = ["ffmpeg-sys-the-third/postproc"]
6362
software-resampling = ["ffmpeg-sys-the-third/swresample"]
6463
software-scaling = ["ffmpeg-sys-the-third/swscale", "codec"]

ffmpeg-sys-the-third/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ avcodec = []
5858
avdevice = ["avformat"]
5959
avfilter = []
6060
avformat = ["avcodec"]
61-
avresample = []
6261
postproc = []
6362
swresample = []
6463
swscale = []

ffmpeg-sys-the-third/build.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ static LIBRARIES: &[Library] = &[
6666
Library::optional("avformat", AVFORMAT_FEATURES, AVFORMAT_HEADERS),
6767
Library::optional("avdevice", AVDEVICE_FEATURES, AVDEVICE_HEADERS),
6868
Library::optional("avfilter", AVFILTER_FEATURES, AVFILTER_HEADERS),
69-
Library::optional("avresample", AVRESAMPLE_FEATURES, AVRESAMPLE_HEADERS),
7069
Library::optional("swscale", SWSCALE_FEATURES, SWSCALE_HEADERS),
7170
Library::optional("swresample", SWRESAMPLE_FEATURES, SWRESAMPLE_HEADERS),
7271
Library::optional("postproc", POSTPROC_FEATURES, POSTPROC_HEADERS),
@@ -216,8 +215,6 @@ static AVFILTER_FEATURES: &[AVFeature] = &[
216215
AVFeature::new("LINK_PUBLIC"),
217216
];
218217

219-
static AVRESAMPLE_FEATURES: &[AVFeature] = &[];
220-
221218
static SWSCALE_FEATURES: &[AVFeature] = &[];
222219

223220
static SWRESAMPLE_FEATURES: &[AVFeature] = &[];
@@ -302,7 +299,6 @@ static AVFILTER_HEADERS: &[AVHeader] = &[
302299
AVHeader::new("buffersrc.h"),
303300
AVHeader::new("avfilter.h"),
304301
];
305-
static AVRESAMPLE_HEADERS: &[AVHeader] = &[AVHeader::new("avresample.h")];
306302
static SWSCALE_HEADERS: &[AVHeader] = &[AVHeader::new("swscale.h")];
307303
static SWRESAMPLE_HEADERS: &[AVHeader] = &[AVHeader::new("swresample.h")];
308304
static POSTPROC_HEADERS: &[AVHeader] = &[AVHeader::new("postprocess.h")];
@@ -562,14 +558,8 @@ fn build(out_dir: &Path, ffmpeg_version: &str) -> io::Result<PathBuf> {
562558
// the binary using ffmpeg-sys cannot be redistributed
563559
configure.switch("BUILD_LICENSE_NONFREE", "nonfree");
564560

565-
let ffmpeg_major_version: u32 = get_major_version(ffmpeg_version);
566-
567561
// configure building libraries based on features
568-
for lib in LIBRARIES
569-
.iter()
570-
.filter(|lib| lib.optional)
571-
.filter(|lib| !(lib.name == "avresample" && ffmpeg_major_version >= 5))
572-
{
562+
for lib in LIBRARIES.iter().filter(|lib| lib.optional) {
573563
configure.switch(&lib.name.to_uppercase(), lib.name);
574564
}
575565

@@ -971,7 +961,6 @@ fn main() {
971961
.allowlist_file(r#".*[/\\]libavformat[/\\].*"#)
972962
.allowlist_file(r#".*[/\\]libavdevice[/\\].*"#)
973963
.allowlist_file(r#".*[/\\]libavfilter[/\\].*"#)
974-
.allowlist_file(r#".*[/\\]libavresample[/\\].*"#)
975964
.allowlist_file(r#".*[/\\]libswscale[/\\].*"#)
976965
.allowlist_file(r#".*[/\\]libswresample[/\\].*"#)
977966
.allowlist_file(r#".*[/\\]libpostproc[/\\].*"#)

0 commit comments

Comments
 (0)