diff options
author | James Almer <jamrial@gmail.com> | 2013-02-16 01:12:30 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-17 00:34:38 +0100 |
commit | 2e988fd689642899927707a084bf40dc1326dc90 (patch) | |
tree | 253b85e7ace5d700e3a1e3974bb7f675e522a5bc | |
parent | 1d6f6ff4d9faf309b1ea38dc11b38c90b72b03fd (diff) | |
download | ffmpeg-2e988fd689642899927707a084bf40dc1326dc90.tar.gz |
lavc/tta: Use a safer check for encrypted streams
The user can provide a password even when the stream
is not encrypted, so check the value of s->format
instead of s->pass in ttafilter_init().
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/tta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c index bcbe037b66..4240946aa2 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -99,7 +99,7 @@ static const int32_t ttafilter_configs[4] = { static void ttafilter_init(TTAContext *s, TTAFilter *c, int32_t shift) { memset(c, 0, sizeof(TTAFilter)); - if (s->pass) { + if (s->format == FORMAT_ENCRYPTED) { int i; for (i = 0; i < 8; i++) c->qm[i] = sign_extend(s->crc_pass[i], 8); |