Explorar o código

obs-outputs: Fix FLV file info offset

Ruwen Hahn %!s(int64=2) %!d(string=hai) anos
pai
achega
dcd1bd9a80
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      plugins/obs-outputs/flv-mux.c

+ 7 - 1
plugins/obs-outputs/flv-mux.c

@@ -123,7 +123,13 @@ static inline double encoder_video_codec(obs_encoder_t *encoder)
 	return 0.0;
 }
 
-#define FLV_INFO_SIZE_OFFSET 42
+/*
+ * This is based on the position of `duration` and `fileSize` in
+ * `build_flv_meta_data` relative to the beginning of the file
+ * to allow `write_file_info` to overwrite these two fields once
+ * the file is finalized.
+ */
+#define FLV_INFO_SIZE_OFFSET 58
 
 void write_file_info(FILE *file, int64_t duration_ms, int64_t size)
 {