[FFmpeg-devel] [PATCH] avformat/utils.c: allows av_read_frame to return after a timeout period.

gga ggarra13 at gmail.com
Sun Nov 24 13:27:59 EET 2019


Friendly ping.  Does the patch need anything else for approval?

On 21/11/19 18:27, ggarra13 at gmail.com wrote:
> From: Gonzalo Garramuño <ggarra13 at gmail.com>
>
> This patch is based on a patch by bsenftner at earthlink.net.
> ---
>   libavformat/utils.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 8196442dd1..c3c2c77c0c 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -1838,6 +1838,11 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
>               }
>           }
>   
> +        if (ff_check_interrupt(&s->interrupt_callback)) {
> +            av_log(s, AV_LOG_DEBUG, "interrupted\n");
> +            return AVERROR_EXIT;
> +        }
> +
>           ret = read_frame_internal(s, pkt);
>           if (ret < 0) {
>               if (pktl && ret != AVERROR(EAGAIN)) {



More information about the ffmpeg-devel mailing list