mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 20:42:19 +00:00
fftools/ffmpeg_enc: return errors from enc_flush() instead of aborting
This commit is contained in:
parent
dde3de0170
commit
43bcf631d0
@ -1250,7 +1250,7 @@ static int transcode(int *err_rate_exceeded)
|
||||
} else if (err_rate)
|
||||
av_log(ist, AV_LOG_VERBOSE, "Decode error rate %g\n", err_rate);
|
||||
}
|
||||
enc_flush();
|
||||
ret = err_merge(ret, enc_flush());
|
||||
|
||||
term_exit();
|
||||
|
||||
|
@ -815,7 +815,7 @@ void enc_free(Encoder **penc);
|
||||
int enc_open(OutputStream *ost, AVFrame *frame);
|
||||
int enc_subtitle(OutputFile *of, OutputStream *ost, const AVSubtitle *sub);
|
||||
int enc_frame(OutputStream *ost, AVFrame *frame);
|
||||
void enc_flush(void);
|
||||
int enc_flush(void);
|
||||
|
||||
/*
|
||||
* Initialize muxing state for the given stream, should be called
|
||||
|
@ -1147,7 +1147,7 @@ int enc_frame(OutputStream *ost, AVFrame *frame)
|
||||
do_video_out(of, ost, frame) : do_audio_out(of, ost, frame);
|
||||
}
|
||||
|
||||
void enc_flush(void)
|
||||
int enc_flush(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -1168,6 +1168,8 @@ void enc_flush(void)
|
||||
|
||||
ret = submit_encode_frame(of, ost, NULL);
|
||||
if (ret != AVERROR_EOF)
|
||||
exit_program(1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user