Skip to content

Commit

Permalink
allow saf urls in hls playlists, fixes #894
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Apr 14, 2024
1 parent b728147 commit b4130e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/android/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,11 @@ ulimit -n 2048 1>>"${BASEDIR}"/build.log 2>&1

########################### CUSTOMIZATIONS #######################
cd "${BASEDIR}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1
git checkout android/ffmpeg-kit-android-lib/src/main/cpp/fftools_ffmpeg_demux.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.c 1>>"${BASEDIR}"/build.log 2>&1
cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1
git checkout libavformat/file.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/hls.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1

Expand All @@ -409,6 +411,8 @@ else
cat ../../tools/protocols/libavutil_file.c >> libavutil/file.c
awk '{gsub(/ff_file_protocol;/,"ff_file_protocol;\nextern const URLProtocol ff_saf_protocol;")}1' libavformat/protocols.c > libavformat/protocols.c.tmp
cat libavformat/protocols.c.tmp > libavformat/protocols.c
${SED_INLINE} "s|av_strstart(proto_name, \"file\", NULL))|av_strstart(proto_name, \"file\", NULL) \|\| av_strstart(proto_name, \"saf\", NULL))|g" libavformat/hls.c 1>>"${BASEDIR}"/build.log 2>&1
${SED_INLINE} "s| assert_avoptions|//assert_avoptions|g" "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/fftools_ffmpeg_demux.c 1>>"${BASEDIR}"/build.log 2>&1
echo -e "\nINFO: Enabled custom ffmpeg-kit protocols\n" 1>>"${BASEDIR}"/build.log 2>&1
fi

Expand Down
1 change: 1 addition & 0 deletions scripts/apple/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ fi

########################### CUSTOMIZATIONS #######################
git checkout libavformat/file.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/hls.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1

Expand Down
1 change: 1 addition & 0 deletions scripts/linux/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ ulimit -n 2048 1>>"${BASEDIR}"/build.log 2>&1
########################### CUSTOMIZATIONS #######################
cd "${BASEDIR}"/src/"${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1
git checkout libavformat/file.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/hls.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavformat/protocols.c 1>>"${BASEDIR}"/build.log 2>&1
git checkout libavutil 1>>"${BASEDIR}"/build.log 2>&1

Expand Down

0 comments on commit b4130e7

Please sign in to comment.