From: "Tomas Härdin" <git@haerdin.se>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH v2 2/6] lavf/apc: Read duration from file
Date: Sat, 30 Dec 2023 22:13:16 +0100
Message-ID: <cde40580b7589bf64b0a17178b73675913705c31.camel@haerdin.se> (raw)
In-Reply-To: <d4e59308b3754a2ca7751cd7ee79a76b6f025774.camel@haerdin.se>
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0002-lavf-apc-Read-duration-from-file.patch --]
[-- Type: text/x-patch, Size: 1134 bytes --]
From 2ef5c89c3e3173b26690bad0279fd484a30a6268 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Tue, 26 Dec 2023 14:31:59 +0100
Subject: [PATCH 2/6] lavf/apc: Read duration from file
---
libavformat/apc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/apc.c b/libavformat/apc.c
index b8b18c966c..7765c53088 100644
--- a/libavformat/apc.c
+++ b/libavformat/apc.c
@@ -24,6 +24,7 @@
#include "libavutil/channel_layout.h"
#include "avformat.h"
#include "demux.h"
+#include "internal.h"
static int apc_probe(const AVProbeData *p)
{
@@ -51,8 +52,9 @@ static int apc_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_ADPCM_IMA_APC;
- avio_rl32(pb); /* number of samples */
+ st->duration = avio_rl32(pb); /* number of samples */
st->codecpar->sample_rate = avio_rl32(pb);
+ avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
/* initial predictor values for adpcm decoder */
if ((ret = ff_get_extradata(s, st->codecpar, pb, 2 * 4)) < 0)
--
2.39.2
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
next prev parent reply other threads:[~2023-12-30 21:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-30 21:12 [FFmpeg-devel] [PATCH v2 1/6] doc/general_contents.texi: Add missing ADPCM IMA APC entry Tomas Härdin
2023-12-30 21:13 ` Tomas Härdin [this message]
2023-12-30 21:13 ` [FFmpeg-devel] [PATCH v2 3/6] Un-mark IMA APC as intra-only, only mark first packet as keyframe Tomas Härdin
2023-12-30 21:13 ` [FFmpeg-devel] [PATCH v2 4/6] lavf: Add CRYO APC muxer Tomas Härdin
2023-12-30 21:14 ` [FFmpeg-devel] [PATCH v2 5/6] lavc: Add ADPCM IMA CRYO APC encoder Tomas Härdin
2023-12-30 21:14 ` [FFmpeg-devel] [PATCH v2 6/6] Add myself as APC maintainer Tomas Härdin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cde40580b7589bf64b0a17178b73675913705c31.camel@haerdin.se \
--to=git@haerdin.se \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git