[FFmpeg-devel] [PATCH 1/5] Special case for ff_check_interrupt

Nicolas George nicolas.george at normalesup.org
Sat Jul 13 13:43:02 CEST 2013

Le tridi 23 messidor, an CCXXI, Andrey Utkin a écrit :
> If AVIOInterruptCB.callback == INTERRUPT_CHECK_INT, don't call any
> function, but read value of int variable pointed by AVIOInterruptCB.opaque.
> Based on proposal of Michael Niedermayer

I believe the same result can be achieved with something like this:

int avio_interrupt_cb_from_opaque(void *opaque)
    return *(int *)opaque;

I find it more elegant as it does not require barely standard int-to-pointer
conversions and separates the core implementation from the utility function.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130713/6b7255eb/attachment.asc>

More information about the ffmpeg-devel mailing list