[FFmpeg-devel] [PATCH 2/5] ffmpeg: exit on av_write_trailer failure if exit_on_error is set
Marton Balint
cus at passwd.hu
Thu Oct 22 05:42:43 CEST 2015
On Sun, 18 Oct 2015, Michael Niedermayer wrote:
> On Sun, Oct 18, 2015 at 12:38:51AM +0200, Michael Niedermayer wrote:
>> On Sun, Oct 18, 2015 at 12:24:04AM +0200, Marton Balint wrote:
>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>> ---
>>> ffmpeg.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/ffmpeg.c b/ffmpeg.c
>>> index 95f7e2f..94dfb04 100644
>>> --- a/ffmpeg.c
>>> +++ b/ffmpeg.c
>>> @@ -4106,6 +4106,8 @@ static int transcode(void)
>>> os = output_files[i]->ctx;
>>> if ((ret = av_write_trailer(os)) < 0) {
>>> av_log(NULL, AV_LOG_ERROR, "Error writing trailer: %s", av_err2str(ret));
>>> + if (exit_on_error)
>>> + exit_program(1);
>>
>> i wonder if ffmpeg should attempt to write all files trailers before
>> exiting
I don't think it matters much, if exit_on_error is set, it means the user
wants failure if anything suspicous is going on, he will usually not care
about his outputs if any of them is bad...
Can be changed later if somebody finds this useful.
>
> either way this LGTM
Applied as it is, thanks.
Marton
More information about the ffmpeg-devel
mailing list