aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/isom.h
diff options
context:
space:
mode:
authorerankor <eran.kornblau@kaltura.com>2017-01-12 19:01:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-01 15:09:38 +0100
commit0101d2909550b751dfa5ea35b3a0ca5d9d5572cc (patch)
tree42c6e44305c7bbd53963014e204284fe48e3a166 /libavformat/isom.h
parent0983e1395709c3e14904a5ab8ece32b326275b84 (diff)
downloadffmpeg-0101d2909550b751dfa5ea35b3a0ca5d9d5572cc.tar.gz
mov: fix decryption with edit list
Retain the ranges of frame indexes when applying edit list in mov_fix_index. The index ranges are then used to keep track of the frame index of the current sample. In case of a discontinuity in frame indexes due to edit, update the auxiliary info position accordingly. Reviewed-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/isom.h')
-rw-r--r--libavformat/isom.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 12cefc9ade..abcacab25a 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -121,6 +121,11 @@ typedef struct MOVFragmentIndex {
MOVFragmentIndexItem *items;
} MOVFragmentIndex;
+typedef struct MOVIndexRange {
+ int64_t start;
+ int64_t end;
+} MOVIndexRange;
+
typedef struct MOVStreamContext {
AVIOContext *pb;
int pb_is_copied;
@@ -152,6 +157,9 @@ typedef struct MOVStreamContext {
int time_scale;
int64_t time_offset; ///< time offset of the edit list entries
int current_sample;
+ int64_t current_index;
+ MOVIndexRange* index_ranges;
+ MOVIndexRange* current_index_range;
unsigned int bytes_per_frame;
unsigned int samples_per_frame;
int dv_audio_container;
@@ -198,6 +206,7 @@ typedef struct MOVStreamContext {
uint8_t auxiliary_info_default_size;
uint8_t* auxiliary_info_sizes;
size_t auxiliary_info_sizes_count;
+ int64_t auxiliary_info_index;
struct AVAESCTR* aes_ctr;
} cenc;
} MOVStreamContext;