diff src/wma/wma.c @ 1156:46476de8fc64 trunk

[svn] - avoid a memory leak with FD probing
author nenolod
date Thu, 31 May 2007 17:13:04 -0700
parents 37abd9b3de4b
children 1f3c936b4e0b
line wrap: on
line diff
--- a/src/wma/wma.c	Thu May 31 10:33:46 2007 -0700
+++ b/src/wma/wma.c	Thu May 31 17:13:04 2007 -0700
@@ -212,6 +212,12 @@
 
     codec2 = avcodec_find_decoder(c2->codec_id);
 
+    if (!codec2) {
+        av_close_input_vfsfile(ic2);
+        return 0;
+    }
+
+    av_close_input_vfsfile(ic2);
     return 1;
 }