Giter VIP home page Giter VIP logo

Comments (3)

mpruett avatar mpruett commented on September 6, 2024

Unmodified Audio File Library version 0.2.7 passes the test suite on x86_64. Since 10_au_length_unspecified.dpatch in Debian's audiofile 0.2.6-8 package doesn't apply cleanly against version 0.2.7, it appears that patch is the source of this failure.

The patch below against version 0.2.7 is based upon commit 085132b. With this change running the test suite is successful.

diff -ru audiofile-0.2.7/libaudiofile/next.c audiofile-0.2.7-patched/libaudiofile/next.c
--- audiofile-0.2.7/libaudiofile/next.c 2010-03-18 20:03:58.000000000 -0700
+++ audiofile-0.2.7-patched/libaudiofile/next.c 2011-08-16 11:48:12.163183373 -0700
@@ -64,6 +64,8 @@
    NULL            /* miscellaneous */
 };

+static const uint32_t _AU_LENGTH_UNSPECIFIED = 0xffffffff;
+
 status _af_next_read_init (AFfilesetup setup, AFfilehandle file)
 {
    uint32_t    id, offset, length, encoding, sampleRate, channelCount;
@@ -111,7 +113,11 @@
    track->f.compressionType = AF_COMPRESSION_NONE;

    track->fpos_first_frame = offset;
-   track->data_size = af_flength(file->fh) - offset;
+
+   off_t lengthAvailable = af_flength(file->fh) - offset;
+   if (length == _AU_LENGTH_UNSPECIFIED || length > lengthAvailable)
+       length = lengthAvailable;
+   track->data_size = length;

    switch (encoding)
    {

from audiofile.

alessio avatar alessio commented on September 6, 2024

OK, so now the new 10_au_length_unspecified.patch looks so: http://paste.debian.net/126485/
What do you think about it?

from audiofile.

mpruett avatar mpruett commented on September 6, 2024

The previous version of 10_au_length_unspecified.dpatch is unnecessary, so what I posted above is the entirety of the patch:

http://paste.debian.net/126525/

from audiofile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.