From: Carl Eugen Hoyos <[email protected]>

Reported, analyzed and tested by Gabriel Gerard.

Signed-off-by: Luca Barbato <[email protected]>
---
 libavformat/lxfdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index 75be218..f29b773 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -270,7 +270,7 @@ static int lxf_read_header(AVFormatContext *s)
     if ((video_params >> 22) & 1)
         av_log(s, AV_LOG_WARNING, "VBI data not yet supported\n");
 
-    if ((lxf->channels = (disk_params >> 2) & 0xF)) {
+    if ((lxf->channels = 1 << (disk_params >> 4 & 3) + 1)) {
         if (!(st = avformat_new_stream(s, NULL)))
             return AVERROR(ENOMEM);
 
-- 
1.8.3.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to