[FFmpeg-devel] [PATCH v4] avcodec/pngdec: read colorspace info when decoding with AVDISCARD_ALL

Leo Izen leo.izen at gmail.com
Wed Feb 22 15:49:34 EET 2023

On 2/21/23 20:42, Ronald S. Bultje wrote:
> Hi,
> On Tue, Feb 21, 2023 at 5:36 PM Leo Izen <leo.izen at gmail.com 
> <mailto:leo.izen at gmail.com>> wrote:
>     These chunks are lightweight and it's useful information to have when
>     running ffmpeg -i or ffprobe, for example.
> I disagree conceptually with this. If we want to skip "all" decoding, we 
> should also skip metadata for said frames.
> I think what we're looking for here is a partial decoding stage, e.g. 
> "header-only" or similar, instead of "including framedata", for some or 
> all frames. That's orthogonal to AVDISCARD_*.
> Ronald

The issue is that libavformat and ffmpeg.c obtain metadata by calling 
the decoder with AVDISCARD_ALL. What you're proposing would require a 
structural change elsewhere, and I'm not sure it makes sense to block a 
patch like this one based on a hypothetical change elsewhere.

- Leo Izen (thebombzen)

More information about the ffmpeg-devel mailing list