ffmpeg_4: fix incorrect segment length in hls

(cherry picked from commit ae8dd3c149b4d49e683f1414d417801b80b283e2)
This commit is contained in:
Izorkin 2021-07-05 13:59:30 +03:00 committed by Maximilian Bosch
parent 46c853dfc2
commit 81ed9fd47b
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
1 changed files with 15 additions and 3 deletions

View File

@ -2,6 +2,7 @@
# Darwin frameworks
, Cocoa, CoreMedia, VideoToolbox
, stdenv, lib
, fetchpatch
, ...
}@args:
@ -11,7 +12,18 @@ callPackage ./generic.nix (rec {
sha256 = "03kxc29y8190k4y8s8qdpsghlbpmchv1m8iqygq2qn0vfm4ka2a2";
darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ];
/* Work around https://trac.ffmpeg.org/ticket/9242 */
patches = lib.optional stdenv.isDarwin
./v2-0001-avcodec-videotoolboxenc-define-TARGET_CPU_ARM64-t.patch;
patches = [
# Fix incorrect segment length in HLS child playlist with fmp4 segment format
# FIXME remove in version 4.5
# https://trac.ffmpeg.org/ticket/9193
# https://trac.ffmpeg.org/ticket/9205
(fetchpatch {
name = "ffmpeg_fix_incorrect_segment_length_in_hls.patch";
url = "https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=59032494e81a1a65c0b960aaae7ec4c2cc9db35a";
sha256 = "03zz1lw51kkc3g3vh47xa5hfiz3g3g1rbrll3kcnslvwylmrqmy3";
})
] ++ lib.optionals stdenv.isDarwin [
# Work around https://trac.ffmpeg.org/ticket/9242
./v2-0001-avcodec-videotoolboxenc-define-TARGET_CPU_ARM64-t.patch
];
} // args)