Change #286114
| Category | ffmpeg |
| Changed by | Wojciech Dzierżanowski <wdzierzanowski@opera.com> |
| Changed at | Thu 15 Oct 2026 00:53:38 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | a58779b2e7f6ec18f0eaa81eadb9c88eef0bd962 |
Comments
avformat/aacdec: mark ADTS packets as keyframes
Since 40bd6d8355 ("avcodec/codec_desc: remove Intra Only prop for
AAC") removed AV_CODEC_PROP_INTRA_ONLY from AAC, compute_pkt_fields()
in libavformat/demux.c no longer sets AV_PKT_FLAG_KEY on packets
produced by AAC demuxers.
64bb91fd3b ("avcodec/aac_parser: set key_frame and profile") restored
this at the packet level for builds that use the AAC parser, and
faea08b722 ("avcodec/aac/aacdec: set keyframe flag in output frames")
together with 281b7fc02e ("avcodec/libfdk-aacdec: set keyframe flag
and profile in output frames") did the same for decoder output frames.
None of these help the ADTS demuxer's own packets when no parser is
involved, e.g. in a build configured with --disable-parser=aac, or
when demuxing with -fflags +noparse.
Without the keyframe flag, the generic index is never populated, so
seeking in raw ADTS streams fails, and ffmpeg -c copy discards every
packet as a leading non-keyframe.
This change restores the keyframe flag directly within the ADTS demuxer
so that packet-level keyframe information is available even when the
AAC parser is not used. We can flag every packet unconditionally here:
xHE-AAC is not among the profiles possible in an ADTS stream.
Add fate-adts-noparse-demux, which demuxes with -fflags +noparse to
reach this code path directly, since a build with the AAC parser
enabled otherwise masks the bug.
Changed files
- libavformat/aacdec.c
- tests/fate/demux.mak
- tests/ref/fate/adts-noparse-demux