Skip to content

Commit aba6a05

Browse files
authored
Add libswresample to FFmpeg source build (#560)
1 parent 8ebc76b commit aba6a05

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Diff for: packaging/build_ffmpeg.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ tar -xf ffmpeg.tar.gz --strip-components 1
6161
--enable-avfilter \
6262
--enable-avformat \
6363
--enable-avutil \
64-
--enable-swscale
64+
--enable-swscale \
65+
--enable-swresample
6566

6667
make -j install
6768
ls ${prefix}/*
@@ -78,27 +79,31 @@ if [[ "$(uname)" == Darwin ]]; then
7879
avdevice=libavdevice.58
7980
avfilter=libavfilter.7
8081
swscale=libswscale.5
82+
swresample=libswresample.3
8183
elif [[ ${major_ver} == 5 ]]; then
8284
avutil=libavutil.57
8385
avcodec=libavcodec.59
8486
avformat=libavformat.59
8587
avdevice=libavdevice.59
8688
avfilter=libavfilter.8
8789
swscale=libswscale.6
90+
swresample=libswresample.4
8891
elif [[ ${major_ver} == 6 ]]; then
8992
avutil=libavutil.58
9093
avcodec=libavcodec.60
9194
avformat=libavformat.60
9295
avdevice=libavdevice.60
9396
avfilter=libavfilter.9
9497
swscale=libswscale.7
98+
swresample=libswresample.4
9599
elif [[ ${major_ver} == 7 ]]; then
96100
avutil=libavutil.59
97101
avcodec=libavcodec.61
98102
avformat=libavformat.61
99103
avdevice=libavdevice.61
100104
avfilter=libavfilter.10
101105
swscale=libswscale.8
106+
swresample=libswresample.5
102107
else
103108
printf "Error: unexpected FFmpeg major version: %s\n" ${major_ver}
104109
exit 1;
@@ -120,7 +125,7 @@ if [[ "$(uname)" == Darwin ]]; then
120125
fi
121126

122127
# list up the paths to fix
123-
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil} ${swscale}; do
128+
for lib in ${avcodec} ${avdevice} ${avfilter} ${avformat} ${avutil} ${swscale} ${swresample}; do
124129
${otool} -l ${prefix}/lib/${lib}.dylib | grep -B2 ${prefix}
125130
done
126131

@@ -155,6 +160,13 @@ if [[ "$(uname)" == Darwin ]]; then
155160
${prefix}/lib/${swscale}.dylib
156161
${otool} -l ${prefix}/lib/${swscale}.dylib | grep -B2 ${prefix}
157162

163+
${install_name_tool} \
164+
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \
165+
-delete_rpath ${prefix}/lib \
166+
-id @rpath/${swresample}.dylib \
167+
${prefix}/lib/${swresample}.dylib
168+
${otool} -l ${prefix}/lib/${swresample}.dylib | grep -B2 ${prefix}
169+
158170
${install_name_tool} \
159171
-change ${prefix}/lib/${avcodec}.dylib @rpath/${avcodec}.dylib \
160172
-change ${prefix}/lib/${avutil}.dylib @rpath/${avutil}.dylib \

0 commit comments

Comments
 (0)