File: 0095-ffmpeg-fix-libavutil-version-check-for-AVFrame.ch_la.patch

package info (click to toggle)
vlc 3.0.21-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 212,728 kB
  • sloc: ansic: 441,379; cpp: 110,628; objc: 36,394; sh: 6,947; makefile: 6,592; javascript: 4,902; xml: 1,611; asm: 1,355; yacc: 640; python: 555; lex: 88; perl: 77; sed: 16
file content (29 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Wed, 19 Jun 2024 08:36:40 +0200
Subject: ffmpeg: fix libavutil version check for AVFrame.ch_layout

It was added in db6efa1815e217ed76f39aee8b15ee5c64698537 which
was libavutil 57.23.100 at the time but the minor version was not updated in
that commit so we check 57.24.100.

This is part of FFmpeg 5.1.

https://github.com/FFmpeg/FFmpeg/commit/db6efa1815e217ed76f39aee8b15ee5c64698537
(cherry picked from commit f237155887f049f8befef2fdfadae7b60f697b0d)
---
 modules/codec/avcodec/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index fb22f03..c27771a 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -407,7 +407,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         ret = avcodec_receive_frame( ctx, frame );
         if( ret == 0 )
         {
-#if LIBAVCODEC_VERSION_CHECK(59, 24, 100)
+#if LIBAVUTIL_VERSION_CHECK(57, 24, 100)
             int channels = frame->ch_layout.nb_channels;
 #else
             int channels = ctx->channels;