[FFmpeg-devel] [PATCH 3/3] avformat/async: avoid deadlock on close

Michael Niedermayer michael at niedermayer.cc
Tue Jul 21 15:18:48 CEST 2015


On Tue, Jul 21, 2015 at 09:09:47PM +0800, Zhang Rui wrote:
> ---
>  libavformat/async.c | 53 ++++++++++++++++++++++++++++++-----------------------
>  1 file changed, 30 insertions(+), 23 deletions(-)
> 
> diff --git a/libavformat/async.c b/libavformat/async.c
> index be02308..45c484a 100644
> --- a/libavformat/async.c
> +++ b/libavformat/async.c
> @@ -71,17 +71,16 @@ typedef struct Context {
>      AVIOInterruptCB interrupt_callback;
>  } Context;
>  
> -static int async_interrupt_callback(void *arg)
> +static int async_check_interrupt(void *arg)
>  {
> -    URLContext *h   = arg;
> -    Context    *c   = h->priv_data;
> +    URLContext *h = arg;
> +    Context    *c = h->priv_data;

please dont mix cosmetic and non cosmeatic changes in the same patch
it makes reading and understanding it harder


[...]
> @@ -155,7 +162,7 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
>  {
>      Context         *c = h->priv_data;
>      int              ret;

> -    AVIOInterruptCB  interrupt_callback = {.callback = async_interrupt_callback, .opaque = h};
> +    AVIOInterruptCB  interrupt_callback = {.callback = async_check_interrupt, .opaque = h};

renaming a function also should be in a seperate patch

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150721/4dbe0b64/attachment.sig>


More information about the ffmpeg-devel mailing list