rtmp: Don't try to do av_malloc(0)
[ffmpeg.git] / libavformat / rtmpproto.c
index 70e4b14..f499bd3 100644 (file)
@@ -683,7 +683,7 @@ static int get_packet(URLContext *s, int for_header)
         return AVERROR_EOF;
 
     for (;;) {
-        RTMPPacket rpkt;
+        RTMPPacket rpkt = { 0 };
         if ((ret = ff_rtmp_packet_read(rt->stream, &rpkt,
                                        rt->chunk_size, rt->prev_pkt[0])) <= 0) {
             if (ret == 0) {