aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hls_sample_encryption.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hls: Don't access FFInputFormat.raw_codec_idAndreas Rheinhardt2024-03-261-0/+1
| | | | | | | | It is an implementation detail of other input formats whether they use raw_codec_id or not. The HLS demuxer should not rely on this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hls_sample_encryption: Always free AC3HeaderInfo on errorAndreas Rheinhardt2023-08-021-4/+2
| | | | | | | | | | | | The code currently presumes that a return value of AVERROR(ENOMEM) implies that ac3hdr could not be allocated, so it need not be freed. Yet any avpriv_ac3_parse_header() might allocate more than the AC3HeaderInfo internally (it doesn't currently), so simply free it unconditionally. Fixes Coverity issues #1492870 and #1492868. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.hAndreas Rheinhardt2022-05-151-0/+1
| | | | | | | | | | Move AC3HeaderInfo into ac3_parser_internal.h and the rest into a new header ac3defs.h. This also breaks an include cycle of ac3.h and ac3tab.h (the latter now only needs ac3defs.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Remove unnecessary inclusions from libavcodecAndreas Rheinhardt2022-03-231-0/+1
| | | | | | Also improve the other headers a bit while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* hls_sample_encryption: convert to new channel layout APIJames Almer2022-03-151-5/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ac3tab: Unavpriv ac3_channel_layout_tabAndreas Rheinhardt2022-01-041-1/+3
| | | | | | | | | | | | | | | | | It is small (16 B) and therefore the overhead of exporting it more than outweighs the size savings from not having duplicated symbols: When the symbol is no longer avpriv, one saves twice the size of the string containing the symbols name (2x30 byte), two entries in .dynsym (24 bytes each on x64), one entry in the importing libraries .got and .rela.dyn (8 + 24 bytes on x64) and two entries for the symbol version (2 bytes each) and one hash value in the exporting library (4 bytes). (The exact numbers are of course different for other platforms (e.g. when using dlls), but given that the strings saved alone more than outweigh the array size it can be presumed that this is beneficial for all platforms.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/hls_sample_encryption: Fix precedenceAndreas Rheinhardt2021-11-091-1/+1
| | | | | | | Fixes Coverity ticket #1492869. Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavformat/hls: add support for decryption of HLS media segments encrypted ↵Nachiket Tarate2021-10-131-0/+389
using SAMPLE-AES encryption method Apple HTTP Live Streaming Sample Encryption: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption Signed-off-by: Nachiket Tarate <nachiket.programmer@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>