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 6A4264AB06 for ; Wed, 12 Jun 2024 13:48:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B0E7868D8C5; Wed, 12 Jun 2024 16:47:56 +0300 (EEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0CDC768D7E2 for ; Wed, 12 Jun 2024 16:47:49 +0300 (EEST) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-35f225ac23bso3385064f8f.0 for ; Wed, 12 Jun 2024 06:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718200068; x=1718804868; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7mAP4BBqN85oWIp2+n6dw/EIDroihIMKsoDLVa7oRCU=; b=EqqDgntdVFydgu2DGVOTT8XO4xtXfa3IC5pdesM6JFSrfMr8aOedAZPiQH0PSEJ6ku pCaduFhhG7uSZ/t7rdRz96taYoSjq3rX6tLe1qTUcVXD2GDE6BnOtW3DasSQVrAX6TYq R41cG07DKN9teVVn/wmkgbR9GO19fdQZoSCzWUK8r+YtFQP+leRRDgQuNE/nnKOM4FHF o/k084W8tBb99OtDjAarAjXudctWKNHOLxDifOef0i0B6uLavEj6qo2PKFicbPAjB/JX gx92yT68ybYC7BJqt+ridbYIlikmmFzlxAD/k8B3upmVS8iQwKeBre1YkBzygw0gdKXT A5Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718200068; x=1718804868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7mAP4BBqN85oWIp2+n6dw/EIDroihIMKsoDLVa7oRCU=; b=WzIwQ9rZMsDPf6tn6CpXBqVgfmPIQ2UCxr64i+VpOEy/FRtE5Lw6LU/ioKC5PwyZkP howQRlU/ZBcbFjjbTMlzi6hnz+uEfThHXeZiY7xQU79FL8VAECLpsnJiZhB/zGOwIMYm D9vCe8MuEL/6dQbhQawrIgpG+gZRiZMle1l034JDxj4paGdg7MNhPP8tOCWIsLK3H8ab 8Ycdckfb3EwWZU9+mDAwY5csh+OD0WNxBC1f9VcUpSgWjxX3EcOxGIclJqnir696eTFe VQm0ePqMK1BrJoexXx2dMuI47XPmSBzuHk2lP2VJnI7G0pU61J0qiMEy0T5IE0q/EgjU k9QQ== X-Gm-Message-State: AOJu0Yz1mC3SYrwJ/2yu+CJX6k0K6bEyWsKn/t0O3nz5xCSnofjyipqN wSzGmc+nRcozAEAyNe/67gX9iJyLdhWy4fUp8y3kxpLBxBxgQx4F90Yjow== X-Google-Smtp-Source: AGHT+IFtmGbTecMA+WI6o1mWa1LY8D+oXxDkp5S/T34QUhX/8q8aEraEHxKX+otuhqDcygKTihgUAw== X-Received: by 2002:a5d:52c2:0:b0:360:7057:c1bb with SMTP id ffacd0b85a97d-3607057c279mr509445f8f.8.1718200068224; Wed, 12 Jun 2024 06:47:48 -0700 (PDT) Received: from localhost.localdomain (2a01cb040b6872000000000000000afa.ipv6.abo.wanadoo.fr. [2a01:cb04:b68:7200::afa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f1f30c3ccsm9969017f8f.7.2024.06.12.06.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 06:47:47 -0700 (PDT) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jun 2024 15:42:09 +0200 Message-ID: <20240612134729.150227-2-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240612134729.150227-1-matthieu.bouron@gmail.com> References: <20240612134729.150227-1-matthieu.bouron@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodecdec_common: ensure input buffer timestamp is positive 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: Submitting a buffer with a negative timestamp seems to stall the Mediacodec audio decoders. --- libavcodec/mediacodecdec_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index d6f91e6e89..4d22db8ecf 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c @@ -658,6 +658,8 @@ int ff_mediacodec_dec_send(AVCodecContext *avctx, MediaCodecDecContext *s, if (pts && avctx->pkt_timebase.num && avctx->pkt_timebase.den) { pts = av_rescale_q(pts, avctx->pkt_timebase, AV_TIME_BASE_Q); } + if (pts < 0) + pts = 0; if (need_draining) { uint32_t flags = ff_AMediaCodec_getBufferFlagEndOfStream(codec); -- 2.45.2 _______________________________________________ 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".