skiptags: properly conceal ID3/APE tags (fixes #18501)
As most demuxers cannot handle tags at the beginning of their input streams, the demuxer code has automatically skipped them for a long time. Unfortunately, a number of demuxers also assume that the initial stream byte offset is zero (while some others seem to assume zero in some paths and not in others). This seems like a reasonable assumption. And even if it were not, fixing all affected stream filters and demuxers to perform only relative seeking seems impractical and unpalatable. This stream filter shifts the stream byte offset so that the tags are entirely invisible, and the demuxer can assume the start is at offset 0. Of couse, the tags must still be accessible to the meta extraction engine(s). The TagLib plugin uses "low-level" vlc_access_NewMRL() so it is not subject to stream filters, and not affected by this change. (This change does however remove tags from "demuxdump".) NOTE: On the one hand, this also enables demuxing a file format with embedded absolute file offsets, if the tags were prepended after muxing. On the other hand, it conversely breaks demuxing such a file format if the tags are added during muxing. As far as I know, tags are normally appended rather than prepended to avoid this ambiguity.
Showing with 185 additions and 0 deletions