[FFmpeg-cvslog] lavc/tta: Use a safer check for encrypted streams

James Almer git at videolan.org
Sun Feb 17 00:44:12 CET 2013


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Feb 16 01:12:30 2013 -0300| [2e988fd689642899927707a084bf40dc1326dc90] | committer: 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: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e988fd689642899927707a084bf40dc1326dc90
---

 libavcodec/tta.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index bcbe037..4240946 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);



More information about the ffmpeg-cvslog mailing list