diff options
author | Simon Hailes <btsimonh@googlemail.com> | 2016-08-30 09:40:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-30 17:14:28 +0200 |
commit | a13a81a0dc98a35293f3f2603db9b01bf76b6a05 (patch) | |
tree | 3ada567d7e14db4edcd475b94a215bae90ffef11 /libavformat/id3v1.h | |
parent | a2fcacc880ca79b3f3636cf3e78d8c9164067224 (diff) | |
download | ffmpeg-a13a81a0dc98a35293f3f2603db9b01bf76b6a05.tar.gz |
avformat/crypto: add seeking support on read
cyrpto allows reading of data which has been aes-128-cbc encrypted given a key and an iv. But it did not handle filetypes which require seeking... e.g. it failed on an encrypted .mp4 file.
example:
take 25.mp4 created with:
ffmpeg -f lavfi -i sine=frequency=1000:beep_factor=2:r=48000:duration=720.0 -f lavfi -i testsrc=duration=720.0:rate=25 -vcodec libx264 -cmp 22 -timecode 10:00:00:00 -r 25 -y out\25.mp4
encrypt with:
openssl enc -aes-128-cbc -K 12345678901234567890123456789012 -iv 12345678901234567890123456789012 -in 25.mp4 -out 25.enc
then to transcode in ffmpeg:
ffmpeg -key 12345678901234567890123456789012 -iv 12345678901234567890123456789012 -i crypto:25.enc -vcodec mpeg4 -r 25 -y 25dec.mp4
prior to this modification, the transcode would fail.
Note also: crypto previously maked both reads and writes as streamed, which caused the whole file
to be read before the transcode started. Now, for read only, if the underlying layer is not marked as streamed,
then crypto is not. This should enable efficient reading of encrypted containers which require seeking.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/id3v1.h')
0 files changed, 0 insertions, 0 deletions