Browse Source

libobs: Ignore non-fatal ffmpeg return values during remux

Similar to 315fbd6 and 6071098, ignore non-fatal errors during the
remux process. It's possible OBS itself writes a file that generates
these errors when remuxed.
Richard Stanway 5 years ago
parent
commit
e00feef7ab
1 changed files with 6 additions and 0 deletions
  1. 6 0
      libobs/media-io/media-remux.c

+ 6 - 0
libobs/media-io/media-remux.c

@@ -224,6 +224,12 @@ static inline int process_packets(media_remux_job_t job,
 		if (ret < 0) {
 			blog(LOG_ERROR, "media_remux: Error muxing packet: %s",
 			     av_err2str(ret));
+
+			/* Treat "Invalid data found when processing input" and
+			 * "Invalid argument" as non-fatal */
+			if (ret == AVERROR_INVALIDDATA || ret == EINVAL)
+				continue;
+
 			break;
 		}
 	}