File: 0003-lavf-Update-the-code-to-work-with-the-latest-libavut.patch

package info (click to toggle)
x264 2%3A0.164.3108%2Bgit31e19f9-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,892 kB
  • sloc: ansic: 69,014; asm: 38,065; sh: 4,723; lisp: 1,795; python: 1,046; perl: 905; makefile: 394
file content (34 lines) | stat: -rw-r--r-- 1,074 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
30
31
32
33
34
From: =?utf-8?q?Martin_Storsj=C3=B6?= <martin@martin.st>
Date: Fri, 4 Apr 2025 16:59:34 +0300
Subject: lavf: Update the code to work with the latest libavutil API

---
 input/lavf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/input/lavf.c b/input/lavf.c
index f5ba6e4..6cec24d 100644
--- a/input/lavf.c
+++ b/input/lavf.c
@@ -33,6 +33,7 @@
 #include <libavutil/error.h>
 #include <libavutil/mem.h>
 #include <libavutil/pixdesc.h>
+#include <libavutil/version.h>
 
 #define FAIL_IF_ERROR( cond, ... ) FAIL_IF_ERR( cond, "lavf", __VA_ARGS__ )
 
@@ -141,8 +142,13 @@ static int read_frame_internal( cli_pic_t *p_pic, lavf_hnd_t *h, int i_frame, vi
     if( info )
     {
         info->fullrange  = is_fullrange;
+#if LIBAVUTIL_VERSION_MAJOR < 60
         info->interlaced = h->frame->interlaced_frame;
         info->tff        = h->frame->top_field_first;
+#else
+        info->interlaced = !!(h->frame->flags & AV_FRAME_FLAG_INTERLACED);
+        info->tff        = !!(h->frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST);
+#endif
     }
 
     if( h->vfr_input )