[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: exit application when decoding returns AVERROR_EXIT
Nicolas George
george at nsup.org
Wed Oct 20 17:56:41 EEST 2021
Soft Works (12021-10-18):
> Introduce a way for decoders to request application exit via error return
>
> Signed-off-by: softworkz <softworkz at hotmail.com>
> ---
> fftools/ffmpeg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index 9d4f9d7a2b..dbbe670a0a 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2727,7 +2727,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
> av_log(NULL, AV_LOG_FATAL, "Error while processing the decoded "
> "data for stream #%d:%d\n", ist->file_index, ist->st->index);
> }
> - if (!decode_failed || exit_on_error)
> + if (!decode_failed || exit_on_error || ret == AVERROR_EXIT)
> exit_program(1);
> break;
> }
On top of everything else that has been said about it, this is not the
semantic of AVERROR_EXIT, which is meant for communication within a
library.
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20211020/253c507a/attachment.sig>
More information about the ffmpeg-devel
mailing list