Skip to content

Commit f877819

Browse files
committed
apply patch
1 parent f49688d commit f877819

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY sample-5s.webm app/sample-5s.webm
1212
COPY sample.mp4 app/sample.mp4
1313
COPY sample-av1.webm app/sample-av1.webm
1414
COPY aac.patch app/aac.patch
15+
COPY hevc_ps.patch app/hevc_ps.patch
1516

1617
RUN apk add curl
1718
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

Dockerfile-aws

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ COPY sample-5s.webm app/sample-5s.webm
1212
COPY sample.mp4 app/sample.mp4
1313
COPY sample-av1.webm app/sample-av1.webm
1414
COPY aac.patch app/aac.patch
15+
COPY hevc_ps.patch app/hevc_ps.patch
1516

1617
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
1718
RUN source "$HOME/.cargo/env"

compile-ffmpeg.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ if (fs.existsSync("ffmpeg")) {
154154
execSync("git apply aac.patch --directory ffmpeg", {
155155
stdio: "inherit",
156156
});
157+
execSync("git apply hevc_ps.patch --directory ffmpeg", {
158+
stdio: "inherit",
159+
});
157160
} else {
158161
execSync("git clone https://github.com/ffmpeg/ffmpeg.git", {
159162
stdio: "inherit",
@@ -165,6 +168,9 @@ if (fs.existsSync("ffmpeg")) {
165168
execSync("git apply aac.patch --directory ffmpeg", {
166169
stdio: "inherit",
167170
});
171+
execSync("git apply hevc_ps.patch --directory ffmpeg", {
172+
stdio: "inherit",
173+
});
168174
}
169175

170176
const extraCFlags = [

hevc_ps.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c
2+
index f18b88489b..2cd4d24c5a 100644
3+
--- a/libavcodec/hevc/ps.c
4+
+++ b/libavcodec/hevc/ps.c
5+
@@ -248,13 +248,11 @@ static int decode_profile_tier_level(GetBitContext *gb, AVCodecContext *avctx,
6+
ptl->tier_flag = get_bits1(gb);
7+
ptl->profile_idc = get_bits(gb, 5);
8+
9+
-#if !CONFIG_SMALL
10+
for (int i = 0; ff_hevc_profiles[i].profile != AV_PROFILE_UNKNOWN; i++)
11+
if (ff_hevc_profiles[i].profile == ptl->profile_idc) {
12+
profile_name = ff_hevc_profiles[i].name;
13+
break;
14+
}
15+
-#endif
16+
av_log(avctx, profile_name ? AV_LOG_DEBUG : AV_LOG_WARNING,
17+
"%s profile bitstream\n", profile_name ? profile_name : "Unknown");
18+

0 commit comments

Comments
 (0)