diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2022-07-31 01:14:12 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2022-08-16 18:47:40 +0800 |
commit | 1af7797d212eee9aa86a54f558bcfe6abb22949b (patch) | |
tree | 80c25105a12b99fc7e5c58ff3f5bed179dc499a9 /libavformat/isom.h | |
parent | 98dcdd1868c7697277a0448015d650c1756f3176 (diff) | |
download | ffmpeg-1af7797d212eee9aa86a54f558bcfe6abb22949b.tar.gz |
avformat/mov: fix encryption index in the case of multiple trun
frag_stream_info->index_entry isn't the first sample/trun index.
cenc.frag_index_entry_base failed to catch the case since
current_index > 0.
Fix ticket #9807.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r-- | libavformat/isom.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 9d8646d2ea..fd236b985f 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -135,6 +135,8 @@ typedef struct MOVFragmentStreamInfo { int64_t first_tfra_pts; int64_t tfdt_dts; int64_t next_trun_dts; + // Index of the first sample/trun in the fragment. + int index_base; int index_entry; MOVEncryptionIndex *encryption_index; } MOVFragmentStreamInfo; @@ -253,7 +255,6 @@ typedef struct MOVStreamContext { struct { struct AVAESCTR* aes_ctr; struct AVAES *aes_ctx; - unsigned int frag_index_entry_base; unsigned int per_sample_iv_size; // Either 0, 8, or 16. AVEncryptionInfo *default_encrypted_sample; MOVEncryptionIndex *encryption_index; |