1. 14 Oct, 2015 1 commit
  2. 09 Sep, 2015 3 commits
  3. 20 May, 2015 4 commits
  4. 14 Mar, 2015 1 commit
  5. 27 Jan, 2015 1 commit
  6. 21 Jan, 2015 3 commits
  7. 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
  8. 24 Oct, 2014 2 commits
  9. 02 Oct, 2014 1 commit
  10. 30 Aug, 2014 1 commit
  11. 12 Apr, 2014 1 commit
  12. 09 Apr, 2014 3 commits
  13. 02 Mar, 2014 2 commits
  14. 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
  15. 09 Jan, 2014 4 commits
  16. 02 Jan, 2014 1 commit
  17. 30 Nov, 2013 1 commit
  18. 06 Nov, 2013 2 commits
  19. 28 Apr, 2013 1 commit
  20. 21 May, 2012 1 commit
  21. 17 Apr, 2012 1 commit
  22. 15 Jun, 2011 1 commit
  23. 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
  24. 20 Jul, 2010 2 commits