hedgewars/avwrapper/avwrapper.c
changeset 11548 3617c611406b
parent 11406 7012234df6c4
child 11617 b7d5d75469ee
--- a/hedgewars/avwrapper/avwrapper.c	Fri Feb 12 17:03:42 2016 +0300
+++ b/hedgewars/avwrapper/avwrapper.c	Fri Feb 12 14:27:20 2016 -0500
@@ -518,11 +518,10 @@
             return FatalError("Could not open output file (%s)", g_pContainer->filename);
     }
 
-    // write the stream header, if any
-    avformat_write_header(g_pContainer, NULL);
+    g_pVFrame->pts = -1;
 
-    g_pVFrame->pts = -1;
-    return 0;
+    // write the stream header, if any
+    return avformat_write_header(g_pContainer, NULL);
 }
 
 AVWRAP_DECL int AVWrapper_Close()