fftools/ffmpeg_mux: return errors from of_submit_packet()

Do not call exit_program(), as that would conflict with moving this code
into a separate thread.
This commit is contained in:
Anton Khirnov
2022-04-01 10:03:46 +02:00
parent ff593c6c88
commit 52bc8a842e
3 changed files with 43 additions and 19 deletions

View File

@@ -232,7 +232,7 @@ static void submit_packet(OutputFile *of, OutputStream *ost, AVPacket *pkt)
}
}
void of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
int of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
{
int ret;
@@ -243,9 +243,11 @@ void of_submit_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
ret = queue_packet(of, ost, pkt);
if (ret < 0) {
av_packet_unref(pkt);
exit_program(1);
return ret;
}
}
return 0;
}
static int print_sdp(void)