uncommitted - yorick-av

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/.pc/.version b/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/.pc/applied-patches b/.pc/applied-patches
new file mode 100644
index 0000000..e69de29
diff --git a/Makefile b/Makefile
index eef19b1..3645034 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ PKG_LDFLAGS=
 EXTRA_PKGS=$(Y_EXE_PKGS)
 
 # list of additional files for clean
-PKG_CLEAN=libavtest.* libavcheck.* test.mpg
+PKG_CLEAN=libavtest* libavcheck* test.mpg
 
 # autoload file for this package, if any
 PKG_I_START=zlibav-auto.i
diff --git a/check.i b/check.i
index 63fcd69..b537888 100644
--- a/check.i
+++ b/check.i
@@ -47,11 +47,21 @@
 if (open("libav.i", "r", 1)) plug_dir, _("./", plug_dir());
 #include "libav.i"
 
-exts=["mpg", "avi", "ogg", "mkv", "mp4", "mov", "wmv", "vob"];
-vcodec=["mpeg1video", "mpeg4", "libtheora", "libtheora", "mpeg4", "mpeg4", "mpeg4", "mpeg2video"];
+exts=[];
+vcodec=[];
+grow, exts, "mkv", "ogg";
+grow, vcodec, "libtheora", "libtheora";
+grow, exts, "mkv", "mov", "mp4";
+grow, vcodec, "libx265", "libx265", "libx265";
+grow, exts, "mpg";
+grow, vcodec, "mpeg1video";
+grow, exts, "vob";
+grow, vcodec, "mpeg2video";
+grow, exts, "avi", "mkv", "mov", "mp4", "wmv";
+grow, vcodec, "mpeg4", "mpeg4", "mpeg4", "mpeg4", "mpeg4";
  
 for (e=1; e<=numberof(exts); ++e) {
-  fname="libavcheck."+exts(e);
+  fname="libavcheck-"+vcodec(e)+"."+exts(e);
   write, format="==========================================\n"+
                 "     testing extension: '%s'\n"+
                 "==========================================\n", exts(e);
@@ -73,7 +83,7 @@ for (e=1; e<=numberof(exts); ++e) {
 if (!get_env("YAV_NODISPLAY")) {
 
   require, "avtest.i";
-  for (e=1; e<=numberof(exts); ++e) avtest, "libavtest."+exts(e), vcodec=vcodec(e);
+  for (e=1; e<=numberof(exts); ++e) avtest, "libavtest-"+vcodec(e)+"."+exts(e), vcodec=vcodec(e);
 
   include,"mpgtest.i", 3;
   require, "libav-mpeg.i";
diff --git a/debian/changelog b/debian/changelog
index 8357385..5f9227a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+yorick-av (0.0.6-1) unstable; urgency=low
+
+  * New upstream release, fixes: "FTBFS with ffmpeg 5.0", thanks to
+    Sebastian Ramacher (Closes: #1004777).
+  * Make lintian-clean, notably:
+     + Bump debhelper compat level.
+     + Bump Policy standard.
+
+ -- Thibaut Paumard <thibaut@debian.org>  Thu, 17 Feb 2022 16:43:54 +0100
+
 yorick-av (0.0.5-1) unstable; urgency=low
 
   * New upstream release.
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
index 37e6304..009e743 100644
--- a/debian/control
+++ b/debian/control
@@ -3,10 +3,10 @@ Section: science
 Priority: optional
 Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
 Uploaders: Thibaut Paumard <thibaut@debian.org>
-Build-Depends: debhelper (>= 9), yorick-dev (>= 2),
+Build-Depends: debhelper-compat (= 13), yorick-dev (>= 2),
 	       libavformat-dev (>=6:9), libavutil-dev (>=6:9),
 	       libavcodec-dev (>=6:9), libswscale-dev (>=6:9)
-Standards-Version: 4.1.4
+Standards-Version: 4.6.0.1
 Vcs-Git:       https://salsa.debian.org/science-team/yorick-av.git
 Vcs-Browser:   https://salsa.debian.org/science-team/yorick-av
 Homepage:      https://github.com/paumard/yorick-av
diff --git a/debian/lintian-overrides.d/yorick-av b/debian/lintian-overrides.d/yorick-av
index 247c023..974264f 100644
--- a/debian/lintian-overrides.d/yorick-av
+++ b/debian/lintian-overrides.d/yorick-av
@@ -1,2 +1,4 @@
-# no potentially unfortified functions called by any routines
-yorick-av: hardening-no-fortify-functions usr/lib/yorick/lib/yav.so
+yorick-av: hardening-no-fortify-functions [usr/lib/yorick/lib/yav.so]
+yorick-av: hardening-no-bindnow [usr/lib/yorick/lib/yav.so]
+yorick-av: package-contains-documentation-outside-usr-share-doc usr/share/yorick/packages/installed/yav.info
+yorick-av: repeated-path-segment lib usr/lib/yorick/lib/
diff --git a/debian/rules b/debian/rules
index f184bc4..36cae28 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,7 +23,7 @@ override_dh_auto_clean:
 override_dh_auto_test:
 	dh_testdir
 ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
-# Untill 747976 is closed                                                       
+# Untill 747976 is closed                               
 ifeq (,$(filter $(DEB_HOST_ARCH), kfreebsd-i386))
 	yorick -batch check.i
 endif
diff --git a/debian/watch b/debian/watch
index 38c8839..59d2b23 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
-version=3
+version=4
 opts=filenamemangle=s/.+\/v?(.*)\.tar\.gz/yorick-av-$1.tar.gz/ \
   https://github.com/paumard/yorick-av/tags .*/v?(\d[\d\.]+)\.tar\.gz
diff --git a/yav.c b/yav.c
index f5c25d6..473e5a4 100644
--- a/yav.c
+++ b/yav.c
@@ -60,6 +60,7 @@ typedef struct yav_ctxt {
   AVCodec *codec;
   AVCodecContext *enc;
   int open;
+  char filename[1024];
 } yav_ctxt;
 void yav_free(void*obj);
 static y_userobj_t yav_ops = {"LibAV object", &yav_free, 0, 0, 0, 0};
@@ -213,7 +214,7 @@ Y_av_create(int argc)
   if (!obj->oc->oformat) {
     y_error("Could not find suitable output format.");
   }
-  snprintf(obj->oc->filename, sizeof(obj->oc->filename), "%s", filename);
+  snprintf(obj->filename, sizeof(obj->filename), "%s", filename);
 
   /* add the audio and video streams using the default format codecs
      and initialize the codecs */
@@ -239,7 +240,6 @@ Y_av_create(int argc)
     if (c->codec_type != AVMEDIA_TYPE_VIDEO)
       y_error("c->codec_type != AVMEDIA_TYPE_VIDEO");
 
-    avcodec_get_context_defaults3(c, obj->codec);
     if (c->codec_id == AV_CODEC_ID_NONE) c->codec_id = obj->codec->id;
 
     /* put sample parameters */
@@ -297,7 +297,7 @@ void yav_opencodec(yav_ctxt *obj, unsigned int width, unsigned int height) {
     props->avg_bitrate = 0;
     props->vbv_delay = UINT64_MAX;
   }
-  av_dump_format(obj->oc, 0, obj->oc->filename, 1);
+  av_dump_format(obj->oc, 0, obj->filename, 1);
 
   if (obj->video_st) {
     AVCodecContext *c;
@@ -323,8 +323,13 @@ void yav_opencodec(yav_ctxt *obj, unsigned int width, unsigned int height) {
     obj->picture->width=c->width;
     obj->picture->height=c->height;
     obj->picture->format=c->pix_fmt;
-    if (obj->oc->oformat->video_codec == AV_CODEC_ID_H264 ||
-	obj->oc->oformat->video_codec == AV_CODEC_ID_THEORA) obj->picture->pts=-1;
+    /*
+      Initially we had it only for specific codecs, but it does not
+      seem to hurt to always set the picture PTS :
+      if (obj->oc->oformat->video_codec == AV_CODEC_ID_H264 ||
+          obj->oc->oformat->video_codec == AV_CODEC_ID_THEORA)
+    */
+    obj->picture->pts=-1;
 
 
     /* if the output format is not RGB24, then a temporary RGB24
@@ -352,8 +357,8 @@ void yav_opencodec(yav_ctxt *obj, unsigned int width, unsigned int height) {
 
   /* open the output file, if needed */
   if (!(obj->oc->oformat->flags & AVFMT_NOFILE))
-    if (avio_open(&obj->oc->pb, obj->oc->filename, AVIO_FLAG_WRITE) < 0)
-      y_errorq("Could not open '%s'", obj->oc->filename);
+    if (avio_open(&obj->oc->pb, obj->filename, AVIO_FLAG_WRITE) < 0)
+      y_errorq("Could not open '%s'", obj->filename);
 
   obj->open = 1;
 
@@ -428,8 +433,13 @@ Y_av_write(int argc)
   if (obj->oc->oformat->flags & AVFMT_RAWPICTURE)
     y_error("RAW picture not supported");
 
-  if (obj->oc->oformat->video_codec == AV_CODEC_ID_H264 ||
-      obj->oc->oformat->video_codec == AV_CODEC_ID_THEORA) ++obj->picture->pts;
+  /*
+    Initially we had it only for specific codecs, but it does not
+    seem to hurt to always set the picture PTS :
+    if (obj->oc->oformat->video_codec == AV_CODEC_ID_H264 ||
+        obj->oc->oformat->video_codec == AV_CODEC_ID_THEORA)
+  */
+  ++obj->picture->pts;
 
   if (obj->oc->oformat->flags & AVFMT_RAWPICTURE) {
     int ret=0;
@@ -441,7 +451,6 @@ Y_av_write(int argc)
     pkt.data= obj->video_outbuf;
     // pkt.size= out_size;
     //    pkt.data = dst_picture.data[0];
-    pkt.size = sizeof(AVPicture);
     av_packet_rescale_ts(&pkt, c->time_base, obj->video_st->time_base);
     ret = av_interleaved_write_frame(obj->oc, &pkt);
     if (ret<0)
@@ -465,5 +474,4 @@ void
 Y___av_init(int argc)
 {
   /* initialize libavcodec, and register all codecs and formats */
-  av_register_all();
 }

Run locally

More details

Full run details