]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fs_encode: check for file.file_interface before closing
authorMathieu Rene <mrene@avgs.ca>
Tue, 12 Oct 2010 18:23:55 +0000 (14:23 -0400)
committerMathieu Rene <mrene@avgs.ca>
Tue, 12 Oct 2010 18:23:55 +0000 (14:23 -0400)
src/fs_encode.c

index 03468e804d476c3c920b4ca6663e661ef4785edf..0f5b034a6ec1869bfd492d75ed3bb0ee717e271d 100644 (file)
@@ -195,8 +195,14 @@ int main(int argc, char *argv[])
        r = 0;
 
 end:
-       switch_core_file_close(&fh_input);
-       switch_core_file_close(&fh_output);
+       
+       if (fh_input.file_interface) {
+               switch_core_file_close(&fh_input);              
+       }
+
+       if (fh_output.file_interface) {
+               switch_core_file_close(&fh_output);             
+       }
 
        if (pool) {
                switch_core_destroy_memory_pool(&pool);