Change #248052
| Category | ffmpeg |
| Changed by | Martin Storsjö <martin@martin.st> |
| Changed at | Sat 08 Nov 2025 22:19:31 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 900b77b1b7dfe0ddefbc329226f7ecf6aa55efd3 |
Comments
hlsenc, dashenc: Share the routine for generating a codec string The one in dashenc was added in fe5e6e34c05e274f98528be4f77f3c474473f977, while the one in hlsenc was added later in 0afa171f25bc9b613a77328182e54d6e781269d3. Both have had various additions on top; merge both implementations into one shared. (Notable additions in 060e74e2a970bb12ab138cfff5aaff8d132ffc65, 1cf2f040e34bbfedde60ff3d91b2f7b770aca85b, a2b1dd0ce301450a47c972745a6b33c4c273aa5d and 797f0b27c175022d896e46db4ac2873e3e0a70af.) For H264/avc1, use the implementation from hlsenc (which doesn't use temporary allocations). For most other codecs, use the only implementation from whichever had one. The original dashenc implementation tried to be generic based on RFC 6381, looking up codec tags in ff_codec_movvideo_tags or ff_codec_movaudio_tags, and doing specific extra additions for "mp4a" and "mp4v". In practice, only AV_CODEC_ID_AAC and AV_CODEC_ID_MPEG4 ever mapped to these; simplify this to a more straightforward codec id based handling, and merge with the AAC profile based code from hlsenc. There's a slight behaviour difference from the old one in dashenc; if there's no code for a specific codec ID, we previously just output what we matched from the mov tag tables, but now we won't output anything. But most commonly used codecs in DASH should be covered here.
Changed files
- libavformat/Makefile
- libavformat/codecstring.c
- libavformat/dashenc.c
- libavformat/hlsenc.c
- libavformat/internal.h