On 2021-10-19 09:38 am, Soft Works wrote:

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of
Gyan Doshi
Sent: Tuesday, October 19, 2021 6:01 AM
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: exit
application when decoding returns AVERROR_EXIT



On 2021-10-19 04:54 am, Soft Works wrote:
Introduce a way for decoders to request application exit via error
return

Why? The ffmpeg app may be processing multiple inputs and outputs. At
most, you can close the codec and end the stream.
When a hardware device fails unexpectedly, why should the app continue
running? In this case, it's clear that things do not work as intended.

Because the application may be doing other things and the hardware function may not be central to its task.

See the condition just before the one you added. It is `exit_on_error` which implies that the user can *choose* to exit, or not, upon error. Your patch lets the decoder unilaterally decide to quit without user input.

In fact, I don't think your patch is necessary. You added the condition in process_input_packet() . During decoding, check_decode_result() is called, which has

    if (ret < 0 && exit_on_error)
        exit_program(1);

So, the user can choose to set exit_on_error and get this behaviour.

Regards,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to