mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-03 06:25:10 +00:00
fix(tracks): sniff attachment MIME from file bytes and keep ffmpeg autobsf on repack
This commit is contained in:
@@ -107,24 +107,6 @@ def test_a_repackage_failure_names_the_ffmpeg_reason(tmp_path: Path, monkeypatch
|
||||
track.repackage()
|
||||
|
||||
|
||||
@POSIX_STUBS
|
||||
def test_a_malformed_aac_repackage_retries_with_the_adts_filter(
|
||||
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
script = (
|
||||
'case "$*" in *aac_adtstoasc*) for last; do :; done; echo ok > "$last"; exit 0;; esac\n'
|
||||
"echo 'Malformed AAC bitstream detected' >&2; exit 1"
|
||||
)
|
||||
monkeypatch.setattr(binaries, "FFMPEG", stub(tmp_path, "ffmpeg", script))
|
||||
track = Audio("http://example.test/a.mp4", "en", codec=Audio.Codec.AAC)
|
||||
track.path = tmp_path / "a.mp4"
|
||||
track.path.write_bytes(b"audio")
|
||||
|
||||
track.repackage()
|
||||
|
||||
assert track.path == tmp_path / "a_repack.mp4" and track.path.read_text() == "ok\n"
|
||||
|
||||
|
||||
@POSIX_STUBS
|
||||
def test_a_subtitleedit_failure_names_the_reason_it_wrote_to_stdout(
|
||||
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
|
||||
Reference in New Issue
Block a user