> +static void videotoolbox_default_free(AVCodecContext *avctx)
> +{
> +    AVVideotoolboxContext *videotoolbox = avctx->hwaccel_context;
> +
> +    if (videotoolbox) {
> +        if (videotoolbox->cm_fmt_desc)
> +            CFRelease(videotoolbox->cm_fmt_desc);
> +
> +        if (videotoolbox->session)
Better add VTDecompressionSessionWaitForAsynchronousFrames() here,
in case it is removed from videotoolbox_session_decode_frame() in
future by chance.

Callback could be called even after VTDecompressionSessionInvalidate()
when I try to work with flag kVTDecodeFrame_EnableAsynchronousDecompression
and without VTDecompressionSessionWaitForAsynchronousFrames() per sample
in my own player.

> +            VTDecompressionSessionInvalidate(videotoolbox->session);
> +    }
> +}
> +
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to