avwrapper: Do not ignore avformat_write_header return value
authorkoda
Fri, 12 Feb 2016 14:27:20 -0500
changeset 11548 3617c611406b
parent 11547 64a5ab2c4f00
child 11550 86528b0cd491
avwrapper: Do not ignore avformat_write_header return value
hedgewars/avwrapper/avwrapper.c
--- 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()