diff mpegtsenc.c @ 6212:0c4d80e5428f libavformat

mpegtsenc: allocate correct size for PID table
author mru
date Thu, 01 Jul 2010 23:21:23 +0000
parents ac9ea0fde990
children 17483b8b01e7
line wrap: on
line diff
--- a/mpegtsenc.c	Thu Jul 01 23:18:27 2010 +0000
+++ b/mpegtsenc.c	Thu Jul 01 23:21:23 2010 +0000
@@ -412,7 +412,7 @@
     ts->sdt.write_packet = section_write_packet;
     ts->sdt.opaque = s;
 
-    pids = av_malloc(s->nb_streams);
+    pids = av_malloc(s->nb_streams * sizeof(*pids));
     if (!pids)
         return AVERROR(ENOMEM);