From patchwork Sun Oct 3 14:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SomeRGuy X-Patchwork-Id: 30894 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp3486168iob; Sun, 3 Oct 2021 07:55:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhpIahqNZnQb2llQlx6gX0nQnUtBK/c3TiwUsiOhAlNjx3OwwWSxpA1qby2UFeLuZjutPg X-Received: by 2002:a17:906:e93:: with SMTP id p19mr11483219ejf.133.1633272912858; Sun, 03 Oct 2021 07:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633272912; cv=none; d=google.com; s=arc-20160816; b=E0TWkoLYMdWH5GZOK+HlMroZyx9V+UJNQKu0912gyj7hm4D9UKxcv1pZfw7+7zTaCk C5tmjjVuQQgfX04ZIcnRfMoYRi78434G+PMIU1Y4R5fy/YC7Sya8b0XHVKN0W5OyYSId nVq6Tfg0iVuvQpBYdg/USdFNILlCwFFpTH59VqeQZbU4p2TshfCtW+l1l86jOd370CZm JdLdZ2ITWYrQueDxE5eWNvGNdAR5AbmhtnQCCMFXZJBTBg4D6iP95EUexESthcef4Le6 UlTBqfDV8vBLSyiAfNRaiHba8l4SdvQPYD0SBV60dlpEyOgUJICrgZGSmtD2U5bidLlL UGWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=AKL2TpydxGHuZcf5y3xSTMALNE5p4lnm8/dj5slGjkM=; b=hjwT26OQ0B0jVEEBo2zkCEGjv/xI1Aa20qWFyKpZmTdQh0lCTcOovekRurVRtYYhJB lo/gIyoH8ZJQVmiXY3CnGAJvqSZo5gJHpJJnkyG75FIUL1B2YYbPxLReZX71EWZxFPNn cHs12nPBAaTpeb1ZVZm1fFFaji5DutixWHEe3hIGSoyW0i1D3n1YpndUdwTkAbMkXQSd 7PPUiOJZxDBRm0VumBVmi4l3H1d4WaHkbWe9ZoMHQcAa7mNmvjRq/NwHZvx160bya88h +1MV41bMi2ZcVzOtkDM6yMxYJkbhUpT89z9neEABnd0OPYrcb5j9PTlajRusyEL6grGy RgYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=aK5ETVtx; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j23si6800846eja.499.2021.10.03.07.55.12; Sun, 03 Oct 2021 07:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=aK5ETVtx; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C51A68A861; Sun, 3 Oct 2021 17:55:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B204768A12B for ; Sun, 3 Oct 2021 17:55:01 +0300 (EEST) Received: by mail-wm1-f53.google.com with SMTP id b136-20020a1c808e000000b0030d60716239so3005484wmd.4 for ; Sun, 03 Oct 2021 07:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EDN5FORNkSS26aOs3h/d60krcYxy7SFifV0XXt6FbFw=; b=aK5ETVtx0JVZ9skKmTgkz7jZ0Rg3TjIpP2tz9e5DyKB7fT/aCXpZ+pJ0U488ZIxb7v vwe8H2KQGUCqXkwVNwaAYaJFZrctZWvcbD1/cCrWD08QLQ0RQYn4WzcNAolLZ9itCzsb CdZg2TB44uF7DhAAZBBTZHLoDVhJlMy/vWmiivOtHgR0ZEbp/e8ro+6YIrpTScf4Eo3t SY/WFxw/sFcd4nUfFwaA0yPZ+n3MkrWleIDyh5kFhJxNff1tSHQjW0OeNOKg3oNaPGFf com/8lRp2q1z+CPHma+MH+uLr85WGVwSo8k+PgwSOau9+aNclLCr46cdjlrJTu/Sofqo 1/VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EDN5FORNkSS26aOs3h/d60krcYxy7SFifV0XXt6FbFw=; b=5R/Gmb+HAcmC4OgP6Gj+sdK9eXajugTa8z9tnfk6e3UUokYHzDuoC0WpS5hw+oE94i 7Cr+34W5t9bcKfkAfq6ju+8oSt01aGLOFHvicXHGJJQ+jeqcD5DN8aXA4pvOYyRouTpp YHEu1CxlcO8xVpGCHjHXh7K5rGDsjbvbQzpzVNnbtDsHuWPtxwpZwGCozz0my+4yLavb kiz/+y6vRcfawrhzFugT7cVDmzJPUsWynbQQGGIPxTpxaGeI1crdT5whprinWwOVXOJ2 VlaW0hBRUYcCJfBUfshKZot8Gl0IVyu7rj53nVgzPP2M+OAi2UOdJg7TTNRDzwiIit6d B54w== X-Gm-Message-State: AOAM532Cf0kBBmRqvrODFDfZpM9+UV0I3jEQrO0U7feGIFjEcNPH7jem yJDXEgfyJXGtq9bXJlNCDYsVnJPZ2h0M0w== X-Received: by 2002:a05:600c:3543:: with SMTP id i3mr13927355wmq.64.1633272900668; Sun, 03 Oct 2021 07:55:00 -0700 (PDT) Received: from localhost.localdomain ([84.17.42.35]) by smtp.gmail.com with ESMTPSA id m2sm13763293wmm.3.2021.10.03.07.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 07:55:00 -0700 (PDT) From: SomeRGuy To: ffmpeg-devel@ffmpeg.org Date: Sun, 3 Oct 2021 17:54:38 +0300 Message-Id: <20211003145438.1698-1-wwakabot@gmail.com> X-Mailer: git-send-email 2.30.2.windows.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avfilter/vf_subtitles: Since mkvmerge 19 has fonts types from RFC 8081 and mkvmerge 58 on windows use new file/magic library X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: SomeRGuy Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3AcZlO01xV8L Signed-off-by: SomeRGuy --- ...9-has-fonts-types-from-RFC-8081-and-.patch | 36 +++++++++++++++++++ libavfilter/vf_subtitles.c | 9 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-Since-mkvmerge-19-has-fonts-types-from-RFC-8081-and-.patch diff --git a/0001-Since-mkvmerge-19-has-fonts-types-from-RFC-8081-and-.patch b/0001-Since-mkvmerge-19-has-fonts-types-from-RFC-8081-and-.patch new file mode 100644 index 0000000000..b6ae5fb0b5 --- /dev/null +++ b/0001-Since-mkvmerge-19-has-fonts-types-from-RFC-8081-and-.patch @@ -0,0 +1,36 @@ +From be54313b38fdd5f3c232b6153153e4e7159710c8 Mon Sep 17 00:00:00 2001 +From: SomeRGuy +Date: Sun, 3 Oct 2021 16:48:30 +0300 +Subject: [PATCH] Since mkvmerge 19 has fonts types from RFC 8081 and mkvmerge + 58 on windows use new file/magic library + +Signed-off-by: SomeRGuy +--- + libavfilter/vf_subtitles.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c +index f08a7fba9d..4168234e9e 100644 +--- a/libavfilter/vf_subtitles.c ++++ b/libavfilter/vf_subtitles.c +@@ -270,9 +270,16 @@ static const AVOption subtitles_options[] = { + }; + + static const char * const font_mimetypes[] = { ++ "font/ttf", ++ "font/otf", ++ "font/sfnt", ++ "font/woff", ++ "font/woff2", ++ "application/font-sfnt", ++ "application/font-woff", ++ "application/x-font-ttf", + "application/x-truetype-font", + "application/vnd.ms-opentype", +- "application/x-font-ttf", + NULL + }; + +-- +2.30.2.windows.1 + diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index f08a7fba9d..4168234e9e 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -270,9 +270,16 @@ static const AVOption subtitles_options[] = { }; static const char * const font_mimetypes[] = { + "font/ttf", + "font/otf", + "font/sfnt", + "font/woff", + "font/woff2", + "application/font-sfnt", + "application/font-woff", + "application/x-font-ttf", "application/x-truetype-font", "application/vnd.ms-opentype", - "application/x-font-ttf", NULL };