do not forget to free packet, fix memleak
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 21 May 2008 20:50:41 +0000 (20:50 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 21 May 2008 20:50:41 +0000 (20:50 +0000)
Originally committed as revision 13222 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index e463f32..fc774d9 100644 (file)
@@ -2192,8 +2192,10 @@ static int http_prepare_data(HTTPContext *c)
                         c->buffer_end = c->pb_buffer + len;
 
                         codec->frame_number++;
-                        if (len == 0)
+                        if (len == 0) {
+                            av_free_packet(&pkt);
                             goto redo;
+                        }
                     }
                     av_free_packet(&pkt);
                 }