Commit 2e988fd6 authored by James Almer's avatar James Almer Committed by Michael Niedermayer

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: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1d6f6ff4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment