Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Vasyl Gello
Hi Sebastian!

Then I guess I will try to make inventory of all downstream patches we need,
and given on their amount and complexity, I can try upstreaming them.

This will take some time so I plan to get back to it after ffmpeg5 bug is 
solved.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Sebastian Ramacher
On 2022-04-09 14:39:36 +, Vasyl Gello wrote:
> Hi Sebastian!
> 
> >That's a no-go from me. If bugs need to be fixed in ffmpeg, please get
> >them integrated in upstream ffmpeg. I'm not interested in maintaing a
> >ffmpeg-for-kodi patchset in Debian.
> 
> OK, I totally understand your point. Previously VideoLAN rejected Kodi
> patchsets as useless for upstream (or beneficial only to Kodi).

ffmpeg and libdvd* are not maintained by the same teams.

> Of course I can split patched libdvdread, libdvdnav and ffmpeg into
> separate source packages and maintain them myself, but what is
> the proper way to get all the CVE fixes same day you get it?

Before you introduce another copy of ffmpeg into the archive, please
talk to the security team. Given the high number of CVEs, I would
recommend against it.

> I am not a member of Security Team and not even a Debian Maintainer,
> if that matters. And on the other side I don't want to keep embedded copies
> of video libraries regularly exploited with various vulnerabilities. How can
> we solve this dilemma?

I don't think that maintaing two copies of ffmpeg sustainable. ffmpeg is
simply too big with too many CVEs for that. The best way forward would
be for kodi to not rely on some patches in their ffmpeg builds.

Cheers
-- 
Sebastian Ramacher


signature.asc
Description: PGP signature


Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Vasyl Gello
Hi Sebastian!

>That's a no-go from me. If bugs need to be fixed in ffmpeg, please get
>them integrated in upstream ffmpeg. I'm not interested in maintaing a
>ffmpeg-for-kodi patchset in Debian.

OK, I totally understand your point. Previously VideoLAN rejected Kodi
patchsets as useless for upstream (or beneficial only to Kodi).

Of course I can split patched libdvdread, libdvdnav and ffmpeg into
separate source packages and maintain them myself, but what is
the proper way to get all the CVE fixes same day you get it?

I am not a member of Security Team and not even a Debian Maintainer,
if that matters. And on the other side I don't want to keep embedded copies
of video libraries regularly exploited with various vulnerabilities. How can
we solve this dilemma?
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Sebastian Ramacher
Hi Vasyl

On 2022-04-09 13:54:58, Vasyl Gello wrote:
> P.S.
> 
> I have several reports on Kodi forums about DVD playback issues requiring the 
> patched FFMPEG for Kodi.
> 
> I have an idea since the last year: what if I modify Kodi patchsets for 
> libdvdread, libdvdnav and ffmpeg
> to use "#ifdef KODI_BUILD" guard and extend the respective d/control files 
> with a new set if packages,
> like "libavformat58-kodi" ? Surely the build process of every package will 
> produce two sets of binary
> packages (one set for Kodi and one set for other dependees), but the benefit 
> of such approach is
> centralized maintainability as we don't have to apply same CVE fixes to 
> multiple embedded copies
> of the same libdvdread, libdvdnav and ffmpeg releases.
> 
> What do you think? If you have no principal "no-go", I can make the PoC and 
> push it to my personal
> Salsa space for your review.

That's a no-go from me. If bugs need to be fixed in ffmpeg, please get
them integrated in upstream ffmpeg. I'm not interested in maintaing a
ffmpeg-for-kodi patchset in Debian.

Cheers

> -- 
> Vasyl Gello
> ==
> Certified SolidWorks Expert
> 
> Mob.:+380 (98) 465 66 77
> 
> E-Mail: vasek.ge...@gmail.com
> ==
> 호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

-- 
Sebastian Ramacher



Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Vasyl Gello
P.S.

I have several reports on Kodi forums about DVD playback issues requiring the 
patched FFMPEG for Kodi.

I have an idea since the last year: what if I modify Kodi patchsets for 
libdvdread, libdvdnav and ffmpeg
to use "#ifdef KODI_BUILD" guard and extend the respective d/control files with 
a new set if packages,
like "libavformat58-kodi" ? Surely the build process of every package will 
produce two sets of binary
packages (one set for Kodi and one set for other dependees), but the benefit of 
such approach is
centralized maintainability as we don't have to apply same CVE fixes to 
multiple embedded copies
of the same libdvdread, libdvdnav and ffmpeg releases.

What do you think? If you have no principal "no-go", I can make the PoC and 
push it to my personal
Salsa space for your review.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-04-09 Thread Vasyl Gello
Hi Sebastian!

I tried to address this bug myself, but apart from casual const-pointer 
conversions
there are two breaking changes that I will have to discuss with teammates in 
Kodi
and the member of the FFMPEG Project:

* The QP API is fully removed from the codebase. I worked around the removal by
disabling the single place where the deprecated API was used. However, I don't 
know
the proper way to implement the functional equivalent for the deprecated code.

* The FFmpegDemuxer makes use of cur_dts and other fields of "struct 
AVInputFormat"
moved to private context. I have seen commits in Gnome apps replacing cur_dts 
with the
dts of the last frame seen etc, but I really have to dig deeper into how that 
process works.

Tonight I will push the WIP MR to upstream Github and document all the 
roadblocks I
encountered in detail. Please feel free to join the discussion there if you can 
help.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-01-30 Thread Vasyl Gello
Hi Sebastian!

Thanks for the report! I expected something like that.

Let me forward this issue to Github and see if there is already a patch in the 
tubes.
If it isn't, I will build Kodi myself and PR the fix.
-- 
Vasyl Gello
==
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.ge...@gmail.com

Skype: vasek.gello
==
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

Bug#1004612: kodi: FTBFS with ffmpeg 5.0

2022-01-30 Thread Sebastian Ramacher
Source: kodi
Version: 2:19.3+dfsg1-1
Severity: important
X-Debbugs-Cc: sramac...@debian.org
Tags: sid bookworm ftbfs
Usertags: ffmpeg5.0

kodi FTBFS with ffmpeg 5.0 (available in experimental):
| [ 11%] Building CXX object 
build/cores/dll-loader/CMakeFiles/dllloader.dir/DllLoaderContainer.cpp.o
| cd /<>/obj-x86_64-linux-gnu/build/cores/dll-loader && 
/usr/bin/ccache /usr/lib/ccache/c++ -DAPI_DEBUG 
-I/<>/obj-x86_64-linux-gnu -I/<> 
-I/<>/lib -I/<>/xbmc 
-I/<>/xbmc/platform/linux 
-I/<>/xbmc/cores/VideoPlayer 
-I/<>/obj-x86_64-linux-gnu/build 
-I/<>/obj-x86_64-linux-gnu/build/include 
-I/<>/xbmc/platform/posix -I/usr/include/dbus-1.0 
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/python3.9 
-I/usr/include/samba-4.0 -I/usr/include/libxml2 
-I/<>/obj-x86_64-linux-gnu/build/cores/RetroPlayer/messages 
-I/usr/include/freetype2 -I/usr/include/fribidi 
-I/<>/obj-x86_64-linux-gnu/build/libdvd/include -I/usr/include/lzo 
-I/usr/include/libdrm -g -ffile-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -O3 -Wdate-time 
-D_FORTIFY_SOURCE=2 -D_XBMC -Wall -O2 -g -DNDEBUG -DTARGET_POSIX -DTARGET_LINUX 
-D_GNU_SOURCE -DHAVE_LINUX_UDMABUF=1 -DHAVE_LINUX_DMA_HEAP=1 
-DHAVE_LINUX_DMA_BUF=1 -DHAVE_MKOSTEMP=1 -DHAVE_LINUX_MEMFD=1 -DHAVE_STATX=1 
-DHAVE_SSE=1 -DHAVE_SSE2=1 -DHAVE_SSE3=1 -DHAVE_SSSE3=1 -DHAVE_SSE4_1=1 
-D__STDC_CONSTANT_MACROS -D_FILE_OFFSET_BITS=64 -D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H=\"/usr/lib/x86_64-linux-gnu/kodi\" 
-DINSTALL_PATH=\"/usr/share/kodi\" -std=c++14 -MD -MT 
build/cores/dll-loader/CMakeFiles/dllloader.dir/DllLoaderContainer.cpp.o -MF 
CMakeFiles/dllloader.dir/DllLoaderContainer.cpp.o.d -o 
CMakeFiles/dllloader.dir/DllLoaderContainer.cpp.o -c 
/<>/xbmc/cores/DllLoader/DllLoaderContainer.cpp
| /<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp: In 
member function ‘virtual bool CAEEncoderFFmpeg::Initialize(AEAudioFormat&, 
bool)’:
| /<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:94:33: 
error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
|94 | codec = avcodec_find_encoder(m_CodecID);
|   | ^~~
|   | |
|   | const AVCodec*
| /<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp: In 
member function ‘virtual int CAEEncoderFFmpeg::Encode(uint8_t*, int, uint8_t*, 
int)’:
| /<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:266:17: 
warning: ‘void av_init_packet(AVPacket*)’ is deprecated 
[-Wdeprecated-declarations]
|   266 |   av_init_packet(&m_Pkt);
|   |   ~~^~~~
| In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:45,
|  from 
/<>/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h:14,
|  from 
/<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h:11,
|  from 
/<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:12:
| /usr/include/x86_64-linux-gnu/libavcodec/packet.h:506:6: note: declared here
|   506 | void av_init_packet(AVPacket *pkt);
|   |  ^~
| /<>/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:271:13: 
error: ‘avcodec_encode_audio2’ was not declared in this scope; did you mean 
‘avcodec_encode_subtitle’?
|   271 |   int ret = avcodec_encode_audio2(m_CodecCtx, &m_Pkt, frame, 
&got_output);
|   | ^
|   | avcodec_encode_subtitle
| make[4]: *** 
[build/cores/audioengine/CMakeFiles/audioengine.dir/build.make:107: 
build/cores/audioengine/CMakeFiles/audioengine.dir/Encoders/AEEncoderFFmpeg.cpp.o]
 Error 1

Cheers
-- 
Sebastian Ramacher


signature.asc
Description: PGP signature