Summary: | media-video/ffmpeg[soc]: broken av_packet_get_side_data handling | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chewi, parona |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/jc-kynesim/rpi-ffmpeg/pull/83 | ||
Whiteboard: | fixed in 6.1.1-r3 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412 | ||
Attachments: | build.log |
Description
Sam James
![]() ![]() ![]() ![]() The upstream commit https://github.com/FFmpeg/FFmpeg/commit/ef6a9e5e311f09fa8032974fa4d0c1e166a959bb changes the required size to a size_t*, but the RPi patch is using int*: ``` [...] --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avc.h" #include "avformat.h" #include "mpegts.h" #include "internal.h" @@ -585,8 +586,25 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) ff_rtp_send_vc2hq(s1, pkt->data, size, st->codecpar->field_order != AV_FIELD_PROGRESSIVE ? 1 : 0); break; case AV_CODEC_ID_H264: + { + uint8_t *side_data; + int side_data_size = 0; + + side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, + &side_data_size); + + if (side_data_size != 0) { + int ps_size = side_data_size; + uint8_t * ps_buf = NULL; + + ff_avc_write_annexb_extradata(side_data, &ps_buf, &ps_size); + av_log(s1, AV_LOG_TRACE, "H264: write side data=%d\n", ps_size); + ff_rtp_send_h264_hevc(s1, ps_buf ? ps_buf : side_data, ps_size); + av_free(ps_buf); + } [...] ``` Please keep an eye out for these warnings which become fatal with GCC 14 (see https://wiki.gentoo.org/wiki/Modern_C_porting#What_changed.3F). Thanks to parona for spotting, as I was curious at first how this hadn't come up earlier... It also fails to build with USE=vaapi under GCC 14 for a different reason. It's a one line fix, so I'll tackle that too. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebf0a62268c4b27ffd37234cc8ed9e6054e0053c commit ebf0a62268c4b27ffd37234cc8ed9e6054e0053c Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2024-02-17 14:51:49 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2024-02-17 14:52:56 +0000 media-video/ffmpeg: Fix Clang and GCC 14 issues with new RPi patch Closes: https://bugs.gentoo.org/924558 Closes: https://bugs.gentoo.org/924743 Signed-off-by: James Le Cuirot <chewi@gentoo.org> media-video/ffmpeg/Manifest | 2 +- media-video/ffmpeg/ffmpeg-6.1.1-r3.ebuild | 3 ++- media-video/ffmpeg/ffmpeg-9999.ebuild | 2 +- media-video/ffmpeg/files/ffmpeg-6.1-gcc-14.patch | 13 +++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) |