[FFmpeg-devel] [PATCH] avformat/utils.c: allows av_read_frame to return after a timeout period.
Michael Niedermayer
michael at niedermayer.cc
Tue Nov 26 19:31:17 EET 2019
On Thu, Nov 21, 2019 at 06:27:10PM -0300, 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;
> + }
> +
I think this can be moved into the if() above, which might
reduce the number of calls.
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191126/f094a658/attachment.sig>
More information about the ffmpeg-devel
mailing list