diff --git a/.github/workflows/build-ffmpeg.yml b/.github/workflows/build-ffmpeg.yml index 1d68c80f9..090639888 100644 --- a/.github/workflows/build-ffmpeg.yml +++ b/.github/workflows/build-ffmpeg.yml @@ -512,6 +512,53 @@ jobs: cp ./COPYING.GPLv2 $root_path/ffmpeg_build/LICENSE echo "::endgroup::" + - name: cbs + env: + root_path: ${{ steps.root.outputs.root_path }} + run: | + mkdir -p build + cd build + + echo "::group::configure extra flags for cross compilation" + extra_configure="" + if [[ ${{ matrix.os_type }} == "linux" && ${{ matrix.arch }} == "aarch64" ]]; then + extra_configure=$(cat <> (32 - n)) ^ sign) - sign; + #else +- register int sign; +- register int32_t cache; ++ int sign; ++ int32_t cache; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE(re, s); +@@ -343,8 +343,8 @@ static inline int get_xbits(GetBitContext *s, int n) + #if !CACHED_BITSTREAM_READER + static inline int get_xbits_le(GetBitContext *s, int n) + { +- register int sign; +- register int32_t cache; ++ int sign; ++ int32_t cache; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE_LE(re, s); +@@ -358,7 +358,7 @@ static inline int get_xbits_le(GetBitContext *s, int n) + + static inline int get_sbits(GetBitContext *s, int n) + { +- register int tmp; ++ int tmp; + #if CACHED_BITSTREAM_READER + av_assert2(n>0 && n<=25); + tmp = sign_extend(get_bits(s, n), n); +@@ -378,7 +378,7 @@ static inline int get_sbits(GetBitContext *s, int n) + */ + static inline unsigned int get_bits(GetBitContext *s, int n) + { +- register unsigned int tmp; ++ unsigned int tmp; + #if CACHED_BITSTREAM_READER + + av_assert2(n>0 && n<=32); +@@ -429,7 +429,7 @@ static inline unsigned int get_bits_le(GetBitContext *s, int n) + + return get_val(s, n, 1); + #else +- register int tmp; ++ int tmp; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE_LE(re, s); +@@ -445,7 +445,7 @@ static inline unsigned int get_bits_le(GetBitContext *s, int n) + */ + static inline unsigned int show_bits(GetBitContext *s, int n) + { +- register unsigned int tmp; ++ unsigned int tmp; + #if CACHED_BITSTREAM_READER + if (n > s->bits_left) + #ifdef BITSTREAM_READER_LE diff --git a/ffmpeg_patches/cbs/size_specifier.patch b/ffmpeg_patches/cbs/size_specifier.patch new file mode 100644 index 000000000..5e2eb0cca --- /dev/null +++ b/ffmpeg_patches/cbs/size_specifier.patch @@ -0,0 +1,68 @@ +Patch macro in logs that isn't handled by ./configure + +diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c +index 8c0a5b5719..4594abe022 100644 +--- a/libavcodec/cbs.c ++++ b/libavcodec/cbs.c +@@ -352,7 +352,7 @@ static int cbs_write_unit_data(CodedBitstreamContext *ctx, + if (ret < 0) { + av_log(ctx->log_ctx, AV_LOG_ERROR, "Unable to allocate a " + "sufficiently large write buffer (last attempt " +- "%"SIZE_SPECIFIER" bytes).\n", ctx->write_buffer_size); ++ "%zu bytes).\n", ctx->write_buffer_size); + return ret; + } + } +diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c +index 1229480567..c3e2dd8694 100644 +--- a/libavcodec/cbs_av1.c ++++ b/libavcodec/cbs_av1.c +@@ -754,7 +754,7 @@ static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, + + if (INT_MAX / 8 < size) { + av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid fragment: " +- "too large (%"SIZE_SPECIFIER" bytes).\n", size); ++ "too large (%zu bytes).\n", size); + err = AVERROR_INVALIDDATA; + goto fail; + } +@@ -805,7 +805,7 @@ static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, + if (header.obu_has_size_field) { + if (get_bits_left(&gbc) < 8) { + av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid OBU: fragment " +- "too short (%"SIZE_SPECIFIER" bytes).\n", size); ++ "too short (%zu bytes).\n", size); + err = AVERROR_INVALIDDATA; + goto fail; + } +@@ -822,7 +822,7 @@ static int cbs_av1_split_fragment(CodedBitstreamContext *ctx, + + if (size < obu_length) { + av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid OBU length: " +- "%"PRIu64", but only %"SIZE_SPECIFIER" bytes remaining in fragment.\n", ++ "%"PRIu64", but only %zu bytes remaining in fragment.\n", + obu_length, size); + err = AVERROR_INVALIDDATA; + goto fail; +@@ -901,7 +901,7 @@ static int cbs_av1_read_unit(CodedBitstreamContext *ctx, + } else { + if (unit->data_size < 1 + obu->header.obu_extension_flag) { + av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid OBU length: " +- "unit too short (%"SIZE_SPECIFIER").\n", unit->data_size); ++ "unit too short (%zu).\n", unit->data_size); + return AVERROR_INVALIDDATA; + } + obu->obu_size = unit->data_size - 1 - obu->header.obu_extension_flag; +diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c +index ae7f88a8a3..322215cbf2 100644 +--- a/libavcodec/cbs_vp9.c ++++ b/libavcodec/cbs_vp9.c +@@ -461,7 +461,7 @@ static int cbs_vp9_split_fragment(CodedBitstreamContext *ctx, + } + if (pos + index_size != frag->data_size) { + av_log(ctx->log_ctx, AV_LOG_WARNING, "Extra padding at " +- "end of superframe: %"SIZE_SPECIFIER" bytes.\n", ++ "end of superframe: %zu bytes.\n", + frag->data_size - (pos + index_size)); + } + diff --git a/ffmpeg_sources/ffmpeg b/ffmpeg_sources/ffmpeg index b48951bd2..807afa59c 160000 --- a/ffmpeg_sources/ffmpeg +++ b/ffmpeg_sources/ffmpeg @@ -1 +1 @@ -Subproject commit b48951bd29fbec166428efb5a0e27f51ff98fd84 +Subproject commit 807afa59cca8f6019c4be4043de87a52ee11741c