From 2b0259faf5929610527d2b4b25cd248428332522 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 26 Apr 2012 23:44:31 +0430 Subject: [PATCH] ffs: fix the uninitialized avpacket in ffs_adec() Ffmpeg aac decoder codec started using some of the fields of the passed afpacket since some version of ffmpeg. This resulted in fbff segfaults since it initialized only data and size fields of afpacket. This patch initializes all fields of the passed packet. Because of this bug, fbff could not play files with aac audio streams in the last few months. Since other audio formats were decoded perfectly, I came to the conclusion that there is something wrong with the aac decoder of ffmpeg. This delayed fixing the bug till now. I hoped ffmpeg had a saner API. Thanks to Sara for helping me find this annoying bug. Reported-by: Sara Fauzia --- ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffs.c b/ffs.c index acde2fc..491053b 100644 --- a/ffs.c +++ b/ffs.c @@ -164,7 +164,7 @@ int ffs_vdec(struct ffs *ffs, void **buf) int ffs_adec(struct ffs *ffs, void *buf, int blen) { int rdec = 0; - AVPacket tmppkt; + AVPacket tmppkt = {0}; AVPacket *pkt = ffs_pkt(ffs); if (!pkt) return -1; -- 2.11.4.GIT