[libav-bugs] [Bug 308] Cannot transcode audiobook (.m4b)

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Tue Jun 12 08:30:13 CEST 2012


http://bugzilla.libav.org/show_bug.cgi?id=308

--- Comment #2 from viacheslav.dukalskiy at f-secure.com 2012-06-12 08:30:13 CEST ---
Patch for FFMPEG that fixes the issue (not applicable for Libav)

Index: ffmpeg/libavformat/mov.c
===================================================================
--- ffmpeg.orig/libavformat/mov.c       2012-01-09 14:02:29.000000000 +0100
+++ ffmpeg/libavformat/mov.c    2012-01-09 14:06:00.000000000 +0100
@@ -81,13 +81,18 @@
 static int mov_metadata_trkn(MOVContext *c, ByteIOContext *pb, unsigned len)
 {
     char buf[16];
+    short current, total = 0;

     get_be16(pb); // unknown
-    snprintf(buf, sizeof(buf), "%d", get_be16(pb));
+    current = get_be16(pb);
+    if (len >= 6)
+        total = get_be16(pb);
+    if (!total)
+        snprintf(buf, sizeof(buf), "%d", current);
+    else
+        snprintf(buf, sizeof(buf), "%d/%d", current, total);
     av_metadata_set2(&c->fc->metadata, "track", buf, 0);

-    get_be16(pb); // total tracks
-
     return 0;
 }

-- 
Configure bugmail: http://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list