mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
1d6f6ff4d9
commit
2e988fd689
|
@ -99,7 +99,7 @@ static const int32_t ttafilter_configs[4] = {
|
||||||
|
|
||||||
static void ttafilter_init(TTAContext *s, TTAFilter *c, int32_t shift) {
|
static void ttafilter_init(TTAContext *s, TTAFilter *c, int32_t shift) {
|
||||||
memset(c, 0, sizeof(TTAFilter));
|
memset(c, 0, sizeof(TTAFilter));
|
||||||
if (s->pass) {
|
if (s->format == FORMAT_ENCRYPTED) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
c->qm[i] = sign_extend(s->crc_pass[i], 8);
|
c->qm[i] = sign_extend(s->crc_pass[i], 8);
|
||||||
|
|
Loading…
Reference in New Issue