Merge ~liushuyu-011/ubuntu/+source/notcurses:ubuntu/devel into ubuntu/+source/notcurses:ubuntu/devel

Proposed by Zixing Liu
Status: Needs review
Proposed branch: ~liushuyu-011/ubuntu/+source/notcurses:ubuntu/devel
Merge into: ubuntu/+source/notcurses:ubuntu/devel
Diff against target: 85 lines (+54/-0)
4 files modified
debian/changelog (+8/-0)
debian/patches/ffmpeg-use-duration.patch (+44/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-0)
Reviewer Review Type Date Requested Status
Graham Inggs (community) Approve
Review via email: mp+473382@code.launchpad.net

Description of the change

This merge proposal fixes the notcurses FTBFS with FFmpeg 7

To post a comment you must log in.
Revision history for this message
Graham Inggs (ginggs) wrote :

Looks good to me, thanks!

review: Approve

Unmerged commits

10ff1c7... by Zixing Liu

changelog

c274dfd... by Zixing Liu

d/p/ffmpeg-use-duration.patch: backport an upstream patch to fix FTBFS ...

... with FFmpeg 7

7b0d77b... by Zixing Liu

d/rules: include missing helper Makefile

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index a76be66..c939ae8 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+notcurses (3.0.7+dfsg.1-1ubuntu7) oracular; urgency=medium
7+
8+ * d/rules: include missing helper Makefile.
9+ * d/p/ffmpeg-use-duration.patch: backport an upstream patch to fix FTBFS
10+ with FFmpeg 7.
11+
12+ -- Zixing Liu <zixing.liu@canonical.com> Tue, 17 Sep 2024 12:09:36 -0600
13+
14 notcurses (3.0.7+dfsg.1-1ubuntu6) noble; urgency=high
15
16 * No change rebuild against frame pointers and time_t.
17diff --git a/debian/patches/ffmpeg-use-duration.patch b/debian/patches/ffmpeg-use-duration.patch
18new file mode 100644
19index 0000000..b07c61c
20--- /dev/null
21+++ b/debian/patches/ffmpeg-use-duration.patch
22@@ -0,0 +1,44 @@
23+Description: ffmpeg: use pkt_duration when it's available #2688
24+Author: nick black <dankamongmen@gmail.com>
25+Origin: upstream, https://github.com/dankamongmen/notcurses/commit/bed402adf98ae51efeb9ac3a71f88facfbf7290c
26+Last-Update: 2024-09-17
27+---
28+Index: notcurses/src/media/ffmpeg.c
29+===================================================================
30+--- notcurses.orig/src/media/ffmpeg.c
31++++ notcurses/src/media/ffmpeg.c
32+@@ -39,6 +39,14 @@ typedef struct ncvisual_details {
33+
34+ #define IMGALLOCALIGN 64
35+
36++uint64_t ffmpeg_pkt_duration(const AVFrame* frame){
37++#ifdef FF_API_PKT_DURATION
38++ return frame->pkt_duration;
39++#else
40++ return frame->duration;
41++#endif
42++}
43++
44+ /*static void
45+ print_frame_summary(const AVCodecContext* cctx, const AVFrame* f){
46+ if(f == NULL){
47+@@ -75,7 +83,7 @@ print_frame_summary(const AVCodecContext
48+ }
49+ fprintf(stderr, " PTS %" PRId64 " Flags: 0x%04x\n", f->pts, f->flags);
50+ fprintf(stderr, " %" PRIu64 "ms@%" PRIu64 "ms (%skeyframe) qual: %d\n",
51+- f->pkt_duration, // FIXME in 'time_base' units
52++ ffmpeg_pkt_duration(f), // FIXME in 'time_base' units
53+ f->best_effort_timestamp,
54+ f->key_frame ? "" : "non-",
55+ f->quality);
56+@@ -520,7 +528,9 @@ ffmpeg_stream(notcurses* nc, ncvisual* n
57+ activevopts.n = newn;
58+ }
59+ ++frame;
60+- uint64_t duration = ncv->details->frame->pkt_duration * tbase * NANOSECS_IN_SEC;
61++ // display duration in units of time_base
62++ const uint64_t pktduration = ffmpeg_pkt_duration(ncv->details->frame);
63++ uint64_t duration = pktduration * tbase * NANOSECS_IN_SEC;
64+ double schedns = nsbegin;
65+ sum_duration += (duration * timescale);
66+ schedns += sum_duration;
67diff --git a/debian/patches/series b/debian/patches/series
68index 5b7761e..c386314 100644
69--- a/debian/patches/series
70+++ b/debian/patches/series
71@@ -1,3 +1,4 @@
72 s390x-adt.patch
73 ftbfs-doctest-2.4.9.patch
74 lp-2008108-armhf-metrics-test.patch
75+ffmpeg-use-duration.patch
76diff --git a/debian/rules b/debian/rules
77index e7398cf..3af33fe 100755
78--- a/debian/rules
79+++ b/debian/rules
80@@ -1,5 +1,6 @@
81 #!/usr/bin/make -f
82
83+include /usr/share/dpkg/architecture.mk
84 DEB_HOST_MULTIARCH?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
85 DEB_BUILD_MAINT_OPTIONS=reproducible=+fixfilepath
86

Subscribers

People subscribed via source and target branches

to all changes: