Skip to content

Commit 23b4cea

Browse files
committed
patch ffmpeg for svt-av1 3.0.0
1 parent 98a8c9a commit 23b4cea

3 files changed

Lines changed: 28 additions & 5 deletions

File tree

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,10 +898,15 @@ RUN \
898898
curl -Lf \
899899
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
900900
tar -jx --strip-components=1 -C /tmp/ffmpeg
901+
902+
# Apply patch for svt-av1: https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2249#note_2361478864
903+
COPY /ffmpeg_n7_fix.patch /tmp/ffmpeg/
904+
901905
RUN \
902906
echo "**** compiling ffmpeg ****" && \
903907
cd /tmp/ffmpeg && \
904-
./configure \
908+
patch -p1 < ffmpeg_n7_fix.patch && \
909+
./configure \
905910
--disable-debug \
906911
--disable-doc \
907912
--disable-ffplay \

Dockerfile.aarch64

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,15 @@ RUN \
615615
curl -Lf \
616616
https://ffmpeg.org/releases/ffmpeg-${FFMPEG}.tar.bz2 | \
617617
tar -jx --strip-components=1 -C /tmp/ffmpeg
618-
RUN \
619-
echo "**** compiling ffmpeg ****" && \
620-
cd /tmp/ffmpeg && \
621-
./configure \
618+
619+
# Apply patch for svt-av1: https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2249#note_2361478864
620+
COPY /ffmpeg_n7_fix.patch /tmp/ffmpeg/
621+
622+
RUN \
623+
echo "**** compiling ffmpeg ****" && \
624+
cd /tmp/ffmpeg && \
625+
patch -p1 < ffmpeg_n7_fix.patch && \
626+
./configure \
622627
--disable-debug \
623628
--disable-doc \
624629
--disable-ffplay \

ffmpeg_n7_fix.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
2+
index 8fa42d590b..e99c656c5d 100644
3+
--- a/libavcodec/libsvtav1.c
4+
+++ b/libavcodec/libsvtav1.c
5+
@@ -430,7 +430,7 @@ static av_cold int eb_enc_init(AVCodecContext *avctx)
6+
7+
svt_enc->eos_flag = EOS_NOT_REACHED;
8+
9+
- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
10+
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
11+
if (svt_ret != EB_ErrorNone) {
12+
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
13+
}

0 commit comments

Comments
 (0)