aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/helpers/qt_fast_start.ex
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-08-30 09:32:22 -0500
committerMark Felder <feld@FreeBSD.org>2020-08-30 09:32:22 -0500
commit4ef210a587113313cd6887b7499832d0c0798f7f (patch)
tree6f24c97de53717f6b0aa4df656fce935f569d723 /lib/pleroma/helpers/qt_fast_start.ex
parent2d2af75777ae468fb08a2b09dc5af4636106a04b (diff)
downloadpleroma-4ef210a587113313cd6887b7499832d0c0798f7f.tar.gz
Credo
Diffstat (limited to 'lib/pleroma/helpers/qt_fast_start.ex')
-rw-r--r--lib/pleroma/helpers/qt_fast_start.ex5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/helpers/qt_fast_start.ex b/lib/pleroma/helpers/qt_fast_start.ex
index 8cba06e54..bb93224b5 100644
--- a/lib/pleroma/helpers/qt_fast_start.ex
+++ b/lib/pleroma/helpers/qt_fast_start.ex
@@ -13,7 +13,7 @@ defmodule Pleroma.Helpers.QtFastStart do
# ISO/IEC 14496-12:2015, ISO/IEC 15444-12:2015
# Paracetamol
- def fix(binary = <<0x00, 0x00, 0x00, _, 0x66, 0x74, 0x79, 0x70, _::bits>>) do
+ def fix(<<0x00, 0x00, 0x00, _, 0x66, 0x74, 0x79, 0x70, _::bits>> = binary) do
index = fix(binary, 0, nil, nil, [])
case index do
@@ -59,7 +59,8 @@ defmodule Pleroma.Helpers.QtFastStart do
defp faststart(index) do
{{_ftyp, _, _, _, ftyp}, index} = List.keytake(index, "ftyp", 0)
- # Skip re-writing the free fourcc as it's kind of useless. Why stream useless bytes when you can do without?
+ # Skip re-writing the free fourcc as it's kind of useless.
+ # Why stream useless bytes when you can do without?
{free_size, index} =
case List.keytake(index, "free", 0) do
{{_, _, _, size, _}, index} -> {size, index}