avformat/mov: Increase support for common encryption.
authorJacob Trimble <modmaker@google.com>
Thu, 7 Dec 2017 00:17:54 +0000 (16:17 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 19 Apr 2018 01:15:32 +0000 (03:15 +0200)
commitf7221d8e670ec05471a16cc4cc1cc8e0040b5b5f
treec9254af6d7032623a477b53cd6f5f35217568756
parent37175122824d2706e8d2f67fc067b189ac400cd2
avformat/mov: Increase support for common encryption.

- Parse schm atom to get different encryption schemes.
- Allow senc atom to appear in track fragments.
- Allow 16-byte IVs.
- Allow constant IVs (specified in tenc).
- Allow only tenc to specify encryption (i.e. no senc/saiz/saio).
- Use sample descriptor to detect clear fragments.

This doesn't support:
- Different sample descriptor holding different encryption info.
  - Only first sample descriptor can be encrypted.
- Encrypted sample groups (i.e. seig).
- Non-'cenc' encryption scheme when using -decryption_key.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/isom.h
libavformat/mov.c
libavutil/encryption_info.h
tests/fate/mov.mak
tests/ref/fate/mov-frag-encrypted [new file with mode: 0644]
tests/ref/fate/mov-tenc-only-encrypted [new file with mode: 0644]