gegl/revertleap.patch

18 lines
830 B
Diff
Raw Normal View History

diff -Naur gegl-0.4.48/operations/external/ff-save.c gegl-0.4.48n/operations/external/ff-save.c
--- gegl-0.4.48/operations/external/ff-save.c 2024-09-16 13:16:40.708415682 +0200
+++ gegl-0.4.48n/operations/external/ff-save.c 2024-09-16 13:16:16.068494024 +0200
@@ -470,8 +470,13 @@
{
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: