> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Gyan Doshi > Sent: Tuesday, October 19, 2021 6:21 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 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.
Is that really a realistic scenario that a user wants ffmpeg to continue even though his setup doesn't work? All over the code there are so many less critical conditions that lead ffmpeg to exit. > 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. Yes, exactly. > 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. Well, but usually nobody sets this. So when it isn't set, we should keep ffmpeg alive to let it write a 10 GB logfile? Maybe there's a better way than my patch, but what happens is a bug IMO, and I wouldn't say that it would be a fix to say that a certain option needs to be set by the user to "fix it". Kind regards, softworkz _______________________________________________ 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".