Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: "FFmpeg development discussions and patches" <ffmpeg-devel@ffmpeg.org>
Cc: "Cosmin Stejerean" <cosmin@cosmin.at>, "tc@ffmpeg.org" <tc@ffmpeg.org>
Subject: Re: [FFmpeg-devel] Add Mediacodec audio decoders support
Date: Tue, 16 Jul 2024 16:42:31 +0000
Message-ID: <01010190bc6c96d7-b7c59af8-683f-4d4c-bc67-b6a9eac6586f-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <tencent_2BB56C69D602ED68967D0AAD6E3829C37D0A@qq.com>



> On Jul 16, 2024, at 6:04 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> 
> 
>> On Jul 16, 2024, at 23:48, Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
>> 
>> 
>> 
>>> On Jul 16, 2024, at 4:58 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
>>> 
>>> 
>>> 
>>>> On Jul 16, 2024, at 21:20, Matthieu Bouron <matthieu.bouron@gmail.com> wrote:
>>>> 
>>>> On Wed, Jul 10, 2024 at 6:31 PM Matthieu Bouron
>>>> <matthieu.bouron@gmail.com> wrote:
>>>>> 
>>>>> On Wed, Jul 10, 2024 at 4:04 PM Zhao Zhili <quinkblack@foxmail.com> wrote:
>>>>>> 
>>>>>> 
>>>>>>> On Jun 12, 2024, at 21:42, Matthieu Bouron <matthieu.bouron@gmail.com> wrote:
>>>>>>> 
>>>>>>> Hello,
>>>>>>> 
>>>>>>> This patchset adds Mediacodec audio decoders support. Currently, only AAC, AMR,
>>>>>>> MP3, FLAC, VORBIS and OPUS are supported.
>>>>>>> 
>>>>>>> This is mainly useful to avoid shipping Android builds of FFmpeg that are
>>>>>>> subjects to licensing/patents (due to AAC and AMR).
>>>>>> 
>>>>>> I’m not keen on put OS audio decoder/encoder wrapper into FFmpeg. They don’t bring
>>>>>> new features, they don’t improve performance. I know these type of wrapper exist in current
>>>>>> project, but I’m not sure if it’s a good idea to add more.
>>>>> 
>>>>> I agree that on the technical side it doesn't bring new features nor
>>>>> performance improvements. It's all about avoiding licensing/patents
>>>>> issues with AAC and AMR here.
>>>>> In this specific case we already have the wrapper infrastructure, the
>>>>> audio part only needs small adjustments to work.
>>>>> Moreover, if that helps, I can reduce the scope of the patch to AAC
>>>>> and AMR only and get rid of mp3/flac/vorbis/opus support. What do you
>>>>> think ?
>>>> 
>>>> Ping.
>>>> 
>>>> IMHO, this benefits users wanting to ship an Android app that relies
>>>> on FFmpeg upstream in countries that are subject to AAC/AMR licensing.
>>>> While I agree that it's not great from a purely technical pov since we
>>>> already have better native decoders, it will allow the use of FFmpeg
>>>> in such situation without the need to use or create another FFmpeg
>>>> fork dedicated to Android. Plus, as I said above, we already have the
>>>> wrapper and the additional code to make it work for audio is
>>>> relatively small and scoped. Restricting the wrapper to AAC/AMR seems
>>>> like a good compromise to me.
>>> 
>>> Sounds reasonable, but I’d like to get more opinions. cc TC.
>> 
>> To add another data point, the platform decoders might also be more secure due to sandboxing. I believe as of Android Q the software decoders provided by MediaCodec have been moved to run within a constrained sandbox.
> 
> I don’t think what Android says “secure” apply to use. The sandbox means not to
> break the OS and leak information from one APP to another APP, because mediacodec
> service is shared by all APP. An APP with FFmpeg inside and use software decoder/encoder
> don’t have such issues since the APP don’t share decoders/encoders with other APP.
> 

It's still an issue if a vulnerability in a software decoder gives an attacker access to the same app's data, even if per app sandboxing keeps a compromised application from accessing data from other apps. 

For example consider a messaging app. If you receive a message containing media that exploits a vulnerability in a software decoder and that gives the attacker access to all of your contacts and messages within the app, that's definitely a security issue. 
The app itself might also have other permissions to system wide resources, etc. 


- Cosmin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2024-07-16 16:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 13:42 Matthieu Bouron
2024-06-12 13:42 ` [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodecdec_common: ensure input buffer timestamp is positive Matthieu Bouron
2024-06-12 13:42 ` [FFmpeg-devel] [PATCH 2/2] avcodec: add Mediacodec audio decoders support Matthieu Bouron
2024-07-10  8:47   ` Matthieu Bouron
2024-07-28 15:23   ` Zhao Zhili
2024-06-12 14:00 ` [FFmpeg-devel] Add " Paul B Mahol
2024-07-10 13:54 ` Zhao Zhili
2024-07-10 16:31   ` Matthieu Bouron
2024-07-16 13:20     ` Matthieu Bouron
2024-07-16 14:58       ` Zhao Zhili
     [not found]         ` <2009DBEE-686A-42F6-A5DF-35147272EEF0@cosmin.at>
2024-07-16 15:48           ` Cosmin Stejerean via ffmpeg-devel
2024-07-16 16:04             ` Zhao Zhili
     [not found]               ` <057FD6DF-E71C-49D0-8D11-7A7E4D5FB5CC@cosmin.at>
2024-07-16 16:42                 ` Cosmin Stejerean via ffmpeg-devel [this message]
2024-07-16 18:24             ` Rémi Denis-Courmont
     [not found]               ` <205EB89E-F6F9-438D-A9BC-E76E5439C7C7@cosmin.at>
2024-07-16 20:14                 ` Cosmin Stejerean via ffmpeg-devel
2024-07-17  9:38                   ` Anton Khirnov
2024-07-17 12:19                     ` Michael Niedermayer
2024-07-19 19:59                     ` Martin Storsjö
2024-07-17 15:39             ` Paul B Mahol
     [not found]               ` <4F1B9768-96C8-4708-92ED-AC8E1C9FC46F@cosmin.at>
2024-07-17 17:35                 ` Cosmin Stejerean via ffmpeg-devel
2024-07-23 11:35   ` Martin Storsjö
2024-07-23 11:44     ` Zhao Zhili
2024-07-23 13:43       ` Anton Khirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01010190bc6c96d7-b7c59af8-683f-4d4c-bc67-b6a9eac6586f-000000@us-west-2.amazonses.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=cosmin@cosmin.at \
    --cc=tc@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git