[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#994205: Compilation of libopenshot fails with FFmpeg 4.4




Package: libopenshot
Version: 0.2.5+dfsg1-5

When libopenshot (v. 0.2.5+dfsg1-5) is compiled with FFMPEG 4.4-6 (now in bookworm/sid) compilation fails.


The patch in attachment (proposed here: https://github.com/OpenShot/libopenshot/pull/698) fixes the issue.

I am using Ubuntu 20.04, kernel 5.11.0-34-generic and libc6 2.31-0ubuntu9.
diff -Nru libopenshot-0.2.5.orig/src/FFmpegWriter.cpp libopenshot-0.2.5/src/FFmpegWriter.cpp
--- libopenshot-0.2.5.orig/src/FFmpegWriter.cpp	2020-03-03 03:00:06.000000000 -0500
+++ libopenshot-0.2.5/src/FFmpegWriter.cpp	2021-09-11 22:05:52.000000000 -0400
@@ -1710,7 +1710,10 @@
 										 audio_encoder_buffer_size, 0);
 
 				// Create output frame (and allocate arrays)
-				frame_final->nb_samples = audio_input_frame_size;
+                frame_final->nb_samples = audio_input_frame_size;
+                frame_final->channels = info.channels;
+                frame_final->format = audio_codec->sample_fmt;
+                frame_final->channel_layout = info.channel_layout;
 				av_samples_alloc(frame_final->data, frame_final->linesize, info.channels, frame_final->nb_samples, audio_codec->sample_fmt, 0);
 
 				// Convert audio samples
----------------------------
     RUNNING ALL TESTS
----------------------------
[libvpx @ 0x5620a7020700] v1.10.0
[libvpx @ 0x5620a7020700] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] using cpu capabilities: MMX2 SSE2 SSE3 Cache64
[libx264 @ 0x5620a7363100] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0x5620a7363100] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=8 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=12 keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=12 rc=abr mbtree=1 bitrate=5000 ratetol=1.0 qcomp=0.60 qpmin=2 qpmax=30 qpstep=4 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
[libx264 @ 0x5620a7363100] Ignoring attempt to flush encoder that doesn't support it
/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/tests/FFmpegWriter_Tests.cpp:116:1: error: Failure in Options_Overloads: Expected 1 but was 0
/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/tests/FFmpegWriter_Tests.cpp:119:1: error: Failure in Options_Overloads: Expected 2 but was 0
/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/tests/FFmpegWriter_Tests.cpp:120:1: error: Failure in Options_Overloads: Expected 3 but was 4
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
FAILURE: 1 out of 93 tests failed (3 failures).
Test time: 23.54 seconds.
----------------------------
make[4]: *** [tests/CMakeFiles/test.dir/build.make:60: tests/CMakeFiles/test] Error 3
make[4]: Leaving directory '/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/debian/build'
make[3]: *** [CMakeFiles/Makefile2:489: tests/CMakeFiles/test.dir/all] Error 2
make[3]: Leaving directory '/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/debian/build'
make[2]: *** [CMakeFiles/Makefile2:496: tests/CMakeFiles/test.dir/rule] Error 2
make[2]: Leaving directory '/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/debian/build'
make[1]: *** [Makefile:332: test] Error 2
make[1]: Leaving directory '/home/nicola/Software/Ubuntu/openshot/test/libopenshot-0.2.5+dfsg1/debian/build'
dh_auto_test: error: cd debian/build && make -j8 test ARGS\+=-j8 returned exit code 2

Reply to: