Bug 462409 - Update liboggplay to get fixes for Solaris and EOF issues - rs=roc
--- a/media/liboggplay/README_MOZILLA
+++ b/media/liboggplay/README_MOZILLA
@@ -1,11 +1,11 @@
The source from this directory was copied from the liboggplay svn
source using the update.sh script. The only changes made were those
applied by update.sh and the addition/upate of Makefile.in files for
the Mozilla build system.
http://svn.annodex.net/liboggplay/trunk/
-The svn revision number used was r3729.
+The svn revision number used was r3757.
The patch from Annodex trac ticket 421 is applied to fix bug 459938:
http://trac.annodex.net/ticket/421
--- a/media/liboggplay/src/liboggplay/oggplay.c
+++ b/media/liboggplay/src/liboggplay/oggplay.c
@@ -95,17 +95,17 @@ oggplay_initialise(OggPlay *me, int bloc
me->oggz = oggz_new(OGGZ_READ | OGGZ_AUTO);
oggz_io_set_read(me->oggz, me->reader->io_read, me->reader);
oggz_io_set_seek(me->oggz, me->reader->io_seek, me->reader);
oggz_io_set_tell(me->oggz, me->reader->io_tell, me->reader);
oggz_set_read_callback(me->oggz, -1, oggplay_callback_predetected, me);
while (1) {
- if (oggz_read(me->oggz, OGGZ_READ_CHUNK_SIZE) < 0) {
+ if (oggz_read(me->oggz, OGGZ_READ_CHUNK_SIZE) <= 0) {
return E_OGGPLAY_BAD_INPUT;
}
if (me->all_tracks_initialised) {
break;
}
}
--- a/media/liboggplay/src/liboggplay/std_semaphore.h
+++ b/media/liboggplay/src/liboggplay/std_semaphore.h
@@ -29,17 +29,17 @@
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _STD_SEMAPHORE_H
#define _STD_SEMAPHORE_H
-#if defined(linux)
+#if defined(linux) || defined(SOLARIS)
#include <semaphore.h>
#define SEM_CREATE(p,s) sem_init(&(p), 1, s)
#define SEM_SIGNAL(p) sem_post(&(p))
#define SEM_WAIT(p) sem_wait(&(p))
#define SEM_CLOSE(p) sem_destroy(&(p))
typedef sem_t semaphore;
#elif defined(WIN32)
#include <windows.h>