]> git.sesse.net Git - mlt/blobdiff - src/modules/avformat/producer_avformat.c
fix leak of dv packets
[mlt] / src / modules / avformat / producer_avformat.c
index 263972b8744895c02b58baaaf4d32429c5914a1e..8b327c374a25f1707d4b23afaaa7dfe543f218b5 100644 (file)
@@ -790,8 +790,11 @@ static int get_basic_info( producer_avformat self, mlt_profile profile, const ch
                                if ( ret >= 0 && pkt.stream_index == self->video_index && pkt.size > 0 )
                                {
                                        get_aspect_ratio( properties, format->streams[ self->video_index ], codec_context, &pkt );
+                                       av_free_packet(&pkt);
                                        break;
                                }
+                               if ( ret >= 0 )
+                                       av_free_packet(&pkt);
                        }
                }
                else