mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
|
From 298b6a2afb87b4b5b15c6e715967b57534cd0af0 Mon Sep 17 00:00:00 2001
|
||
|
From: Lukas Oberhuber <lukaso@gmail.com>
|
||
|
Date: Sat, 4 May 2024 23:54:25 +0000
|
||
|
Subject: [PATCH] ff-save: Fix 66de8124
|
||
|
|
||
|
---
|
||
|
operations/external/ff-save.c | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
|
||
|
index ffa5d8bee..0dd9f96cd 100644
|
||
|
--- a/operations/external/ff-save.c
|
||
|
+++ b/operations/external/ff-save.c
|
||
|
@@ -470,8 +470,13 @@ static void encode_audio_fragments (Priv *p, AVFormatContext *oc, AVStream *st,
|
||
|
{
|
||
|
float left = 0, right = 0;
|
||
|
get_sample_data (p, i + p->audio_read_pos, &left, &right);
|
||
|
+#if LIBAVCODEC_VERSION_MAJOR < 61
|
||
|
+ ((int32_t*)frame->data[0])[c->channels*i+0] = left * (1<<31);
|
||
|
+ ((int32_t*)frame->data[0])[c->channels*i+1] = right * (1<<31);
|
||
|
+#else
|
||
|
((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<31);
|
||
|
((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<31);
|
||
|
+#endif
|
||
|
}
|
||
|
break;
|
||
|
case AV_SAMPLE_FMT_S32P:
|
||
|
--
|
||
|
GitLab
|
||
|
|