From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0919B427CF for ; Wed, 30 Mar 2022 20:42:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2996968B289; Wed, 30 Mar 2022 23:42:54 +0300 (EEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B09868A77A for ; Wed, 30 Mar 2022 23:42:47 +0300 (EEST) Received: by mail-wm1-f47.google.com with SMTP id bg31-20020a05600c3c9f00b00381590dbb33so774310wmb.3 for ; Wed, 30 Mar 2022 13:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WMKKTVAoJ8C9nPHnz/m9GU+NDC6R8lb3XZsBIL7Jl70=; b=Jw3WtJCj4oWAFv335g4AoDcxhpfCMjOv4FsymBItl3pqviE3Jb6dS2Pz7xj3mp3kAi LnxGZeSfSPjhhi5w6tnaOoCDVmDolg8twe7GA+1VHjhlv21LyueeEPBvkzfy7w3uOMOS q/M+WryzQGe1gi3UdHtKVY2CZNO7P+hGHZLqG9Z9aUJhHnDLidPb2zBCkXwEIVgtmPEu EICwLdJE5XXZcPjIUq6ljWYc2DolHANsdb2zDKBta3PmyRYHM4WnDDmmJDhLdqLONJzG xGy8deghP5gfbT+KSoIwkc7goQddywI61N5JrtOU6jyLbVyEEAh0znEqPZluuYPghmy1 A8xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WMKKTVAoJ8C9nPHnz/m9GU+NDC6R8lb3XZsBIL7Jl70=; b=XmIYR9AZTk4DP/kS2M3CyhIpBu5g+QBElP2jPgZnWxIcD1Ql5WuY4tbutGF7HYP+rv qczOuw99jh+7cN+K48aOL9/9mTIjs/nYop3T4oO8fqsRAqNZvq3Z8I/j7ba01G/uOYzg TuOouqVWMz/ewmyo/cJJVgs4MV0vHHRtM1wTwCdsq/dBhtfx0L/vutfKRTWVAMaWPW5P RmUMxENhFRSWxhJMCctzlk3FdPqbkYj5oNVQbn9E4rPikKW1j3Sl3a6AIoa8WBkVjURF GlM154hTDeHWsSbiMevUWnqbwLzDAR+A1IwQDvvJ6d0VXMHWUBILA9tBjx1G1AIJzVnB lYIg== X-Gm-Message-State: AOAM530cEQWgUroA2dCJQR3R+b5pCWhIBsiW37M5inMh6HLFmXhxHE9y l5PgwxTNVShMRbj+GRMquiR7gs98qSk= X-Google-Smtp-Source: ABdhPJz3KX+4UEn9HPd1IrCAvzRfeXh2Ws5CscGM7gqCX9ArkxyTC/Xfz8f1x4q3p8NyewLx0Mqffg== X-Received: by 2002:a1c:cc01:0:b0:37b:dcc8:7dfd with SMTP id h1-20020a1ccc01000000b0037bdcc87dfdmr1334879wmb.134.1648672966483; Wed, 30 Mar 2022 13:42:46 -0700 (PDT) Received: from localhost.localdomain (lputeaux-656-1-153-220.w217-128.abo.wanadoo.fr. [217.128.47.220]) by smtp.gmail.com with ESMTPSA id u11-20020a5d6acb000000b002058148822bsm25520456wrw.63.2022.03.30.13.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 13:42:46 -0700 (PDT) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Mar 2022 22:42:39 +0200 Message-Id: <20220330204239.212305-1-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/mediacodecdec_common: stop the codec before releasing it X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Matthieu Bouron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes the following warnings/errors on codec release: E/BufferQueueProducer: [SurfaceTexture-0-31763-0](id:7c1300000001,api:3,p:31763,c:31763) detachBuffer: slot 0 is not owned by the producer (state = FREE) E/BufferQueueProducer: [SurfaceTexture-0-31763-0](id:7c1300000001,api:3,p:31763,c:31763) detachBuffer: slot 1 is not owned by the producer (state = FREE) E/BufferQueueProducer: [SurfaceTexture-0-31763-0](id:7c1300000001,api:3,p:31763,c:31763) detachBuffer: slot 2 is not owned by the producer (state = FREE) [...] --- libavcodec/mediacodecdec_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index cb18aed401..d99881c11f 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c @@ -232,6 +232,7 @@ static void ff_mediacodec_dec_unref(MediaCodecDecContext *s) if (atomic_fetch_sub(&s->refcount, 1) == 1) { if (s->codec) { + ff_AMediaCodec_stop(s->codec); ff_AMediaCodec_delete(s->codec); s->codec = NULL; } -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".