Skip to content

Commit 1c6fa4c

Browse files
kuba160Oleksiy-Yakovenko
authored andcommitted
Add ffmpeg plugin on Windows (fixes #3159)
1 parent 573c2ce commit 1c6fa4c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/windowsbuild.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
mingw-w64-x86_64-flac mingw-w64-x86_64-curl mingw-w64-x86_64-portaudio mingw-w64-x86_64-faad2 mingw-w64-x86_64-flac
2121
mingw-w64-x86_64-wavpack mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libogg mingw-w64-x86_64-opusfile mingw-w64-x86_64-opus
2222
mingw-w64-x86_64-libsndfile mingw-w64-x86_64-libsamplerate mingw-w64-x86_64-yasm rsync
23+
mingw-w64-x86_64-ffmpeg
2324
- name: Build for Windows
2425
shell: msys2 {0}
2526
run: TRAVIS_OS_NAME=windows travis/build.sh

plugins/ffmpeg/ffmpeg.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ _free_info_data(ffmpeg_info_t *info) {
305305
avcodec_free_frame(&info->frame);
306306
}
307307
if (info->buffer) {
308+
#ifdef __MINGW32__
309+
__mingw_aligned_free (info->buffer);
310+
#else
308311
free (info->buffer);
312+
#endif
309313
}
310314
// free everything allocated in _init and _read
311315
if (info->have_packet) {

premake5.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ newoption {
2828

2929
if _OPTIONS["standard"] ~= nil then
3030
plugins_to_disable = {"plugin-converter", "plugin-converter_gtk2",
31-
"plugin-converter_gtk3","plugin-ffmpeg","plugin-waveout",
31+
"plugin-converter_gtk3", "plugin-waveout",
3232
"plugin-wildmidi", "plugin-soundtouch", "plugin-sid", "plugin-gme",
3333
"plugin-mms", "plugin-cdda", "plugin-sc68", "plugin-vtx",
3434
"plugin-notify"}
@@ -742,7 +742,8 @@ project "ffmpeg"
742742
"plugins/ffmpeg/*.c",
743743
}
744744
pkgconfig ("libavformat")
745-
-- links {"avcodec", "pthread", "avformat", "avcodec", "avutil", "z", "opencore-amrnb", "opencore-amrwb", "opus"}
745+
pkgconfig ("libavcodec")
746+
pkgconfig ("libavutil")
746747
end
747748

748749
if option ("plugin-vorbis", "vorbisfile vorbis ogg") then

0 commit comments

Comments
 (0)