Fix #34511: Invalid Audio/Video codec combination produces hung filehandle
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 11 Mar 2013 11:09:57 +0000 (11:09 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 11 Mar 2013 11:09:57 +0000 (11:09 +0000)
source/blender/blenkernel/intern/writeffmpeg.c

index 7e51025..c9e0795 100644 (file)
@@ -837,7 +837,8 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
        }
        if (avformat_write_header(of, NULL) < 0) {
                BKE_report(reports, RPT_ERROR, "Could not initialize streams, probably unsupported codec combination");
-                       av_dict_free(&opts);
+               av_dict_free(&opts);
+               avio_close(of->pb);
                return 0;
        }