From patchwork Fri Jun 10 21:30:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Bruienne X-Patchwork-Id: 36148 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp30144pzj; Fri, 10 Jun 2022 14:30:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgyQW+ul2zZnjiI5/L2SCTxQFjZ6320DM5wPSkNZDr+xeZLfPojyYJAMrUhFzo4DK6b69B X-Received: by 2002:a17:906:f84:b0:711:eda5:db31 with SMTP id q4-20020a1709060f8400b00711eda5db31mr15810248ejj.397.1654896652822; Fri, 10 Jun 2022 14:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654896652; cv=none; d=google.com; s=arc-20160816; b=mdgdgDSMZwgnJXSQ45oxfQsvX5zSlxuURazfoQi18TCWuxMTl9UJwZnwEQ8zEYOpEe +vEpX9u/XDrS3UoCO2l6dd3tfa3NXGx2lY6iz0JQHPNDu4B4os1/VmZCObtD2RvfI/DJ UlFUr7wf3OJvJGO/FzCgAciNiJ5sZMbSC6OxpvCEdatGSatpTtT3N6YqLLPR6YhszYSN 9k6C6I/PD3+zZnyseFcmXdvocbC97DINrKVBWARDVQzqLy5qf3zCQPi9sd3ej0B0980A 14Uip6Yw3D6e5v32Wip/fm55/akaSgfgH4PDc4k+9CrN2pW7kxgUSZmSWm2MOnX3JpnA HxnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:to:from:user-agent:mime-version:date:message-id :dkim-signature:delivered-to; bh=fzZg6IO5t64ZbJST24ULHIrYS/WJ8u4npfxMTvZhfhg=; b=NVOCs3BybHV5qw4QXEfV6bBv/EggPk+QB/lN+E1FuMlVM5rAA7BdL0KejQjVmUh1a+ vdRLxgqlT632/7bEX6+EyWDrnuqYdNNMqpSA22y8BvEeepgjYk6UzvFTENzK+vqFw9Fr 25L9BC2Zz3QQeg8/wHp6jRFEasP1WLF/XvzM3AQdfUi9/WzY96gXhksP+/Drm6njagrw 6DV5XtDJGkMzQJsfjdnNy2Mbom4PFykCvuCabipIg40HlcwBuBIp3KnK6TfLoY4zzkAk VfrScbwXoOz81gS3vl8mZ/NrWYQlv+7x3U9r1UwkjCNvRX6VTLcOO2CI0hyI2IjVCe0y koIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=K3LKMy25; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l15-20020aa7d94f000000b0042b44071db3si318403eds.266.2022.06.10.14.30.28; Fri, 10 Jun 2022 14:30:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=K3LKMy25; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 460C268B4D0; Sat, 11 Jun 2022 00:30:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BF9F68B052 for ; Sat, 11 Jun 2022 00:30:18 +0300 (EEST) Received: by mail-qk1-f177.google.com with SMTP id c83so157327qke.3 for ; Fri, 10 Jun 2022 14:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to :content-language; bh=7mnZqYtOHlZAZT3hLRGezmVkcvHONso4s38Bi0T5J4o=; b=K3LKMy256dLBab9i/uIS0zxLStW84Tmi4EoL5A0gPQ4Ziggh/+fP4jA1F7HsQMHvbt 3jQnpC0ljUL770xoTt09hRHQ8xC8mA4kGwFVGfjTl8Ko8iA0k6TSAy6qvYs6k2Rz+0E6 7pM75/zcOhDlDvC3eLvyJE2wPhQoZDVg76m/0L+mgSVRktYXzUwUYlt34gSHql6KYdNW +HD7+Q9XC33y5MK/1FMRYx2j+EjJs1zEloOt4Hz2ghLDnRUIznCxliBux9DsX0UQCLY2 XI+t5+jhIdu41bArNCyNtnhQcZbHruFrkZVBObxHuDq2M4IYNp2JT5dTkRGOb/mNSwE+ Aj+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:content-language; bh=7mnZqYtOHlZAZT3hLRGezmVkcvHONso4s38Bi0T5J4o=; b=Wjnpc3jGS8AAqYqWAe0V4zsXWQicrNhTXgsLesMX+tkei0AxyB0aVZpzdwH59Dxt5G 319QKwjxu6vVvbq5WFCt9UPdez6kpbitRGKGT3Hivcza+X5fJ5UwWZXwttvMNo+YbqMq n+9Ovz9M4cPGYIhKabpKBOgCHv4qCILRA/xPCSYuQq9gwwe0aGuuSExb7WfeZBxMWhQS 9rjAY5veid7JSjapLUi6YoGpGHLU15HNkJmOmW/mXLqFnb2+U00CB266k/40CsrBdOp2 82znFf4wNLcMVgr3ckiK6PbRVE5TtKbhucaOKDkex2CcYtcqAiSA+GiQHlqx+XFNQ7d0 ixAw== X-Gm-Message-State: AOAM532S3K8TzVGHUA3lRKj0KWuae4Y8hR9j2OF5q00F57mFaAwuyAzK Ohl/q3U5ddBd8XGL8ZWf+uK2ZwTq25c= X-Received: by 2002:a05:620a:f0e:b0:699:c94e:1413 with SMTP id v14-20020a05620a0f0e00b00699c94e1413mr31293682qkl.282.1654896616291; Fri, 10 Jun 2022 14:30:16 -0700 (PDT) Received: from [192.168.7.86] (c-68-40-205-18.hsd1.mi.comcast.net. [68.40.205.18]) by smtp.gmail.com with ESMTPSA id u16-20020a05620a455000b006a6ce613c7csm404470qkp.89.2022.06.10.14.30.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jun 2022 14:30:15 -0700 (PDT) Message-ID: Date: Fri, 10 Jun 2022 17:30:14 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 From: Jack Bruienne To: ffmpeg-devel@ffmpeg.org Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] avcodec: Fix time reporting for DFPWM streams 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DySV1TrhmbWZ This adds the exact bits per sample for DFPWM to av_get_exact_bits_per_sample. Previously, the DTS and PTS were set to 0 because the codec never reported them, but adding this allows libavformat to automatically set DTS and PTS from the byte position of the stream. Signed-off-by: Jack Bruienne --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index eb7e505a..940f25fe 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -495,6 +495,8 @@ const char *avcodec_profile_name(enum AVCodecID codec_id, int profile) int av_get_exact_bits_per_sample(enum AVCodecID codec_id) { switch (codec_id) { + case AV_CODEC_ID_DFPWM: + return 1; case AV_CODEC_ID_8SVX_EXP: case AV_CODEC_ID_8SVX_FIB: case AV_CODEC_ID_ADPCM_ARGO: