1. 14 Mar, 2015 1 commit
  2. 27 Jan, 2015 1 commit
  3. 21 Jan, 2015 3 commits
  4. 06 Nov, 2014 1 commit
    • Andrew Clayton's avatar
      src/md5: Replace the MD5 implementation with the FSF LGPL one · 3dbbdfb5
      Andrew Clayton authored
      With GCC 4.8.3 on x86_64 Fedora 20 we get the following warnings from
      src/md5.c
      
          src/md5.c: In function 'md5_finish_ctx':
          src/md5.c:102:3: warning: dereferencing type-punned pointer will
           break strict-aliasing rules [-Wstrict-aliasing]
          *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] <<
           3);
          ^
          src/md5.c:103:3: warning: dereferencing type-punned pointer will
           break strict-aliasing rules [-Wstrict-aliasing]
          *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP
           ((ctx->total[1] << 3) |
          ^
      
      Rather than trying to fix this, Jean-Baptiste Kempf suggested it would
      be better to replace this old implementation with something newer such
      as the one used in VLC. So, this is what this does.
      
      We take src/misc/md5.c as src/md5.c and include/vlc_md5.h as src/md5.h
      
      md5.c had little changed in it, just some #include changes, I also had
      to remove the restrict keyword from the AddMD5() function definition as
      this is a C99 thing. This shouldn't really make much difference in this
      usage.
      
      md5.h had the VLC_API macro usage removed and I removed the psz_md5_hash
      function as it's not used.
      
      Finally DVDDiscID() in src/dvd_reader.c was changed to make use of this
      new implementation. I tested this with the following program
      
          /*
           * gcc -O2 -Wall -o dvddiscid dvddiscid.c -ldvdread
           */
      
          #include <stdio.h>
      
          #include <dvdread/dvd_reader.h>
      
          int main(void)
          {
              int i;
              dvd_reader_t *dvd;
              unsigned char id[16];
      
              dvd = DVDOpen("/dev/sr0");
              DVDDiscID(dvd, id);
              DVDClose(dvd);
      
              for (i = 0; i < 16; i++)
                   printf("%.2x", id[i]);
              printf("\n");
      
              return 0;
          }
      
      and get the same MD5 before and after this change.
      
          $ ./dvddiscid
          a02f30eb3e76e624b766ec0248757901
      
          $ LD_LIBRARY_PATH=/opt/libdvdread/lib ./dvddiscid
          a02f30eb3e76e624b766ec0248757901
      Signed-off-by: default avatarAndrew Clayton <andrew@digital-domain.net>
      Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
      Tested-by: default avatarSteve Dibb <beandog@gentoo.org>
      3dbbdfb5
  5. 24 Oct, 2014 2 commits
  6. 02 Oct, 2014 1 commit
  7. 30 Aug, 2014 1 commit
  8. 12 Apr, 2014 1 commit
  9. 09 Apr, 2014 3 commits
  10. 02 Mar, 2014 2 commits
  11. 18 Feb, 2014 1 commit
    • Steve Dibb's avatar
      Fix DVDDiscID from reading non-existent IFO files · c820067e
      Steve Dibb authored
      In dvd_reader.c, the DVDDiscID function gets the MD5 from the total contents
      of the IFO files on the disc.  However, it gets it by looping through the
      the first ten IFO files, whether they exist or not.
      
      This results in spewage, where a disc has less than ten.  In this case,
      Dragonheart only has two:
      
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_03_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_04_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_05_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_06_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_07_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_08_0.IFO failed
      libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VTS_09_0.IFO failed
      
      Instead of using a set limit of 10 IFOs, this patch counts the number of
      VTSes existing on the DVD, and will use that number instead if it is less
      than 10.
      Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
      c820067e
  12. 09 Jan, 2014 4 commits
  13. 02 Jan, 2014 1 commit
  14. 30 Nov, 2013 1 commit
  15. 06 Nov, 2013 2 commits
  16. 28 Apr, 2013 1 commit
  17. 21 May, 2012 1 commit
  18. 17 Apr, 2012 1 commit
  19. 15 Jun, 2011 1 commit
  20. 31 Jul, 2010 1 commit
    • Erik Hovland's avatar
      Fix the test of whether disk names should be raw devices · 8c6757a6
      Erik Hovland authored
      Darwin and BSD platforms disk device names might have to be converted
      to raw device names. There is a check for this in the code. But it is
      missing a very important 'r'. This fix made it into the 0.9.7 release
      but did not make the commit to this repo when this repo was given the
      API changes for 0.9.7 because it was not clear whether the fix was
      still relevant.
      8c6757a6
  21. 20 Jul, 2010 5 commits
  22. 01 Jun, 2010 1 commit
  23. 30 Jan, 2010 1 commit
  24. 07 Dec, 2009 1 commit
    • Erik Hovland's avatar
      Expose the dvd_stat_t struct. · 310834ce
      Erik Hovland authored
      The commits that brought in the DVDFileStat() function from libdvdread
      0.9.7 incorrectly made the stat struct opaque. This can't be done because
      the API does not use any allocation or deallocation code. So callers of
      DVDFileStat cannot declare stat structs. Since we are attempting to
      maintain the API compatibility w/ those releases of libdvdread, the
      struct has been brought into the header. Thanks again to Rathann for
      bringing this issue to the dvdnav list. And thanks to the original
      bug reportera(O. Rolland) to fedora.
      
      310834ce
  25. 02 Sep, 2009 2 commits
    • Erik Hovland's avatar
      Add *BSD porting bits from 0.9.7 · 68325fd5
      Erik Hovland authored
      Both version 0.9.6 and 0.9.7 had some porting code put in for the
      *BSDs. This code is untested by me, but I bet the OpenSolaris
      and *BSD folk would love to have it.
      
      68325fd5
    • Erik Hovland's avatar
      Add DVD file stat from version 0.9.7 to libdvdread · eb306491
      Erik Hovland authored
      A new function to do an informational read of the DVD file handle was
      introduced to libdvdread 0.9.7 (or was it .6). Since libdvdread at
      mplayerhq imported an older version of dvdread/dvdnav this part of
      the API was not available. This commit places that function into
      the library making this library complete in reference to 0.9.7.
      
      eb306491