avformat/tee: Fix TeeSlave.bsfs pointer array size
authorJan Sebechlebsky <sebechlebskyjan@gmail.com>
Tue, 3 May 2016 13:21:20 +0000 (16:21 +0300)
committerMarton Balint <cus@passwd.hu>
Sat, 7 May 2016 15:24:15 +0000 (17:24 +0200)
TeeSlave.bsfs is array of pointers to AVBitStreamFilterContext,
so element size should be really size of a pointer, not size
of TeeSlave structure.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/tee.c

index 499ef33..6d2ce53 100644 (file)
@@ -324,7 +324,7 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
     }
     tee_slave->header_written = 1;
 
-    tee_slave->bsfs = av_calloc(avf2->nb_streams, sizeof(TeeSlave));
+    tee_slave->bsfs = av_calloc(avf2->nb_streams, sizeof(*tee_slave->bsfs));
     if (!tee_slave->bsfs) {
         ret = AVERROR(ENOMEM);
         goto end;