ffmpeg-mux: Do not output error if non-fatal error

Fixes a case where stderr can fill up and cause a freeze on Windows
master
Jim 2022-08-22 03:30:10 -07:00
parent d95ebc6294
commit 9b087d15fc
1 changed files with 5 additions and 5 deletions

View File

@ -1159,16 +1159,16 @@ static inline bool ffmpeg_mux_packet(struct ffmpeg_mux *ffm, uint8_t *buf,
int ret = av_interleaved_write_frame(ffm->output, ffm->packet);
if (ret < 0) {
fprintf(stderr, "av_interleaved_write_frame failed: %d: %s\n",
ret, av_err2str(ret));
}
/* Treat "Invalid data found when processing input" and "Invalid argument" as non-fatal */
if (ret == AVERROR_INVALIDDATA || ret == -EINVAL) {
return true;
}
if (ret < 0) {
fprintf(stderr, "av_interleaved_write_frame failed: %d: %s\n",
ret, av_err2str(ret));
}
return ret >= 0;
}