Control: tags -1 - moreinfo
Control: thanks

Le 03/03/2018 à 15:31, Adam D. Barratt a écrit :
Control: tags -1 + moreinfo

On Tue, 2018-02-20 at 12:01 +0100, Thibaut Paumard wrote:
yorick-av has an important bug (important impact on usability, does
not make
the package totally useless) that I only notice now while working on
porting
this package to the upcoming FFmpeg in experimental:

https://bugs.debian.org/890880

The fix is one-line in the C code (at two places).

While I am working on more details for unstable, I would like to be
given the
opportunity to upload this one-liner fix to stable.


I'm afraid that we'd want the issue fixed in unstable first.


Dear Adam,

Thanks for your consideration.

The issue is now fixed in unstable, together with another bug which, although slightly less severe, also produces corrupted output files:

https://bugs.debian.org/892176

I propose to upload the fix to both bugs to stable and attach the corresponding source debdiff. I assume I would need to build and upload with -v0.0.4-1?

Kind regards, Thibaut.


diff -Nru yorick-av-0.0.4/debian/changelog yorick-av-0.0.4/debian/changelog
--- yorick-av-0.0.4/debian/changelog    2016-11-30 11:57:04.000000000 +0100
+++ yorick-av-0.0.4/debian/changelog    2018-03-06 14:56:15.000000000 +0100
@@ -1,3 +1,18 @@
+yorick-av (0.0.4-2~deb9u1) stable; urgency=low
+
+  * Rebuild for stretch.
+
+ -- Thibaut Paumard <thib...@debian.org>  Tue, 06 Mar 2018 14:56:15 +0100
+
+yorick-av (0.0.4-2) unstable; urgency=low
+
+  * Bug fix: "AVPacket timestamps need to be rescaled for most codecs"
+    (Closes: #890880).
+  * Bug fix: "Need to set VBV buffer size for MPEG1/2 files", (Closes:
+    #892176).
+
+ -- Thibaut Paumard <thib...@debian.org>  Tue, 06 Mar 2018 14:01:45 +0100
+
 yorick-av (0.0.4-1) unstable; urgency=low
 
   * New upstream release
diff -Nru yorick-av-0.0.4/debian/patches/rescale-ts 
yorick-av-0.0.4/debian/patches/rescale-ts
--- yorick-av-0.0.4/debian/patches/rescale-ts   1970-01-01 01:00:00.000000000 
+0100
+++ yorick-av-0.0.4/debian/patches/rescale-ts   2018-02-20 11:35:07.000000000 
+0100
@@ -0,0 +1,29 @@
+Description: Rescale frame timestamps
+ Without this, the timestamps are wrong with most codecs, making the
+ output garbage.
+Author: Thibaut Paumard <thib...@debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890880
+Forwarded: not-needed
+Applied-Upstream: ed6b754e03f280708991f579db42dca136431c35
+Last-Update: 2018-02-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/yav.c
++++ b/yav.c
+@@ -391,6 +391,7 @@
+     AVPacket pkt;
+     av_init_packet(&pkt);
+     pkt.flags |= AV_PKT_FLAG_KEY;
++    av_packet_rescale_ts(&pkt, c->time_base, obj->video_st->time_base);
+     pkt.stream_index = obj->video_st->index;
+     pkt.data= obj->video_outbuf;
+     // pkt.size= out_size;
+@@ -408,6 +409,7 @@
+     }
+     /* If size is zero, it means the image was buffered. */
+     if (!ret && got_packet && pkt.size) {
++      av_packet_rescale_ts(&pkt, c->time_base, obj->video_st->time_base);
+       pkt.stream_index = obj->video_st->index;
+       /* Write the compressed frame to the media file. */
+       ret = av_interleaved_write_frame(obj->oc, &pkt);
diff -Nru yorick-av-0.0.4/debian/patches/series 
yorick-av-0.0.4/debian/patches/series
--- yorick-av-0.0.4/debian/patches/series       2016-11-30 11:57:04.000000000 
+0100
+++ yorick-av-0.0.4/debian/patches/series       2018-03-06 13:05:17.000000000 
+0100
@@ -0,0 +1,2 @@
+rescale-ts
+vbv_buffer
diff -Nru yorick-av-0.0.4/debian/patches/vbv_buffer 
yorick-av-0.0.4/debian/patches/vbv_buffer
--- yorick-av-0.0.4/debian/patches/vbv_buffer   1970-01-01 01:00:00.000000000 
+0100
+++ yorick-av-0.0.4/debian/patches/vbv_buffer   2018-03-06 13:56:28.000000000 
+0100
@@ -0,0 +1,33 @@
+Description: Set VBV buffer size for MPEG1/2 files
+ FFmpeg emits warnings when producing MPEG1/2 files and the VBV buffer
+ size has not been set. The output files may then play sluggishly in
+ VLC. This backported patch sets a VBV buffer size sufficient to hold
+ one frame.
+Author: Thibaut Paumard <thib...@debian.org>
+Origin: backport
+Bug-Debian: http://bugs.debian.org/892176
+Forwarded: not-needed
+Applied-Upstream: 0.0.5
+Last-Update: 2018-03-06 
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/yav.c
++++ b/yav.c
+@@ -259,6 +259,17 @@
+ void yav_opencodec(yav_ctxt *obj, unsigned int width, unsigned int height) {
+   obj->video_st->codec->width=width;
+   obj->video_st->codec->height=height;
++  if (obj->video_st->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
++      obj->video_st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
++    AVCPBProperties *props;
++    props = (AVCPBProperties*) av_stream_new_side_data
++      (obj->video_st, AV_PKT_DATA_CPB_PROPERTIES, sizeof(*props));
++    props->buffer_size = width*height*4;
++    props->max_bitrate = 0;
++    props->min_bitrate = 0;
++    props->avg_bitrate = 0;
++    props->vbv_delay = UINT64_MAX;
++  }
+   av_dump_format(obj->oc, 0, obj->oc->filename, 1);
+ 
+   if (obj->video_st) {

Reply via email to