summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-08-01 03:56:31 +0000
committerMike Melanson <mike@multimedia.cx>2002-08-01 03:56:31 +0000
commit0ba07a109bf3dad4feca7d4ab4a58af2ca9120d8 (patch)
tree0e792cb907deb0cb1f013662d1a60b543d88e32a
parentda6b4de729aa7220c844ea9fa8ba4c887fd3cb0f (diff)
downloadxine-lib-0ba07a109bf3dad4feca7d4ab4a58af2ca9120d8.tar.gz
xine-lib-0ba07a109bf3dad4feca7d4ab4a58af2ca9120d8.tar.bz2
always return DEMUX_OK at the very end of the _start() function
CVS patchset: 2376 CVS date: 2002/08/01 03:56:31
-rw-r--r--src/demuxers/demux_film.c6
-rw-r--r--src/demuxers/demux_idcin.c4
-rw-r--r--src/demuxers/demux_qt.c4
-rw-r--r--src/demuxers/demux_roq.c4
-rw-r--r--src/demuxers/demux_smjpeg.c10
-rw-r--r--src/demuxers/demux_wav.c10
6 files changed, 20 insertions, 18 deletions
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c
index f4aa0fd92..fc4e2ce5b 100644
--- a/src/demuxers/demux_film.c
+++ b/src/demuxers/demux_film.c
@@ -21,7 +21,7 @@
* For more information on the FILM file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_film.c,v 1.19 2002/07/17 18:17:48 miguelfreitas Exp $
+ * $Id: demux_film.c,v 1.20 2002/08/01 03:56:31 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -558,7 +558,6 @@ static int demux_film_start (demux_plugin_t *this_gen,
demux_film_t *this = (demux_film_t *) this_gen;
buf_element_t *buf;
int err;
- int status;
pthread_mutex_lock(&this->mutex);
@@ -652,10 +651,9 @@ static int demux_film_start (demux_plugin_t *this_gen,
}
}
- status = this->status;
pthread_mutex_unlock(&this->mutex);
- return status;
+ return DEMUX_OK;
}
static int demux_film_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c
index 96764d6ec..8fffdecff 100644
--- a/src/demuxers/demux_idcin.c
+++ b/src/demuxers/demux_idcin.c
@@ -21,7 +21,7 @@
* For more information regarding the Id CIN file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: demux_idcin.c,v 1.2 2002/07/14 22:27:25 miguelfreitas Exp $
+ * $Id: demux_idcin.c,v 1.3 2002/08/01 03:56:31 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -336,7 +336,7 @@ return DEMUX_FINISHED;
pthread_mutex_unlock(&this->mutex);
- return this->status;
+ return DEMUX_OK;
}
static int demux_idcin_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 4ccecea6a..06cd91c9d 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -30,7 +30,7 @@
* build_frame_table
* free_qt_info
*
- * $Id: demux_qt.c,v 1.74 2002/07/31 06:04:53 tmmm Exp $
+ * $Id: demux_qt.c,v 1.75 2002/08/01 03:56:31 tmmm Exp $
*
*/
@@ -1616,7 +1616,7 @@ static int demux_qt_start (demux_plugin_t *this_gen,
pthread_mutex_unlock(&this->mutex);
- return this->status;
+ return DEMUX_OK;
}
diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c
index d45b4bbce..2a9796a83 100644
--- a/src/demuxers/demux_roq.c
+++ b/src/demuxers/demux_roq.c
@@ -21,7 +21,7 @@
* For more information regarding the RoQ file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: demux_roq.c,v 1.9 2002/07/14 22:27:25 miguelfreitas Exp $
+ * $Id: demux_roq.c,v 1.10 2002/08/01 03:56:31 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -466,7 +466,7 @@ static int demux_roq_start (demux_plugin_t *this_gen,
pthread_mutex_unlock(&this->mutex);
- return this->status;
+ return DEMUX_OK;
}
static int demux_roq_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c
index 4d267e95e..bbeaae45d 100644
--- a/src/demuxers/demux_smjpeg.c
+++ b/src/demuxers/demux_smjpeg.c
@@ -21,7 +21,7 @@
* For more information on the SMJPEG file format, visit:
* http://www.lokigames.com/development/smjpeg.php3
*
- * $Id: demux_smjpeg.c,v 1.5 2002/07/19 14:07:38 pmhahn Exp $
+ * $Id: demux_smjpeg.c,v 1.6 2002/08/01 03:56:31 tmmm Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -130,7 +130,7 @@ static void *demux_smjpeg_loop (void *this_gen) {
if (this->input->read(this->input, preamble,
SMJPEG_CHUNK_PREAMBLE_SIZE) != SMJPEG_CHUNK_PREAMBLE_SIZE) {
this->status = DEMUX_FINISHED;
- return NULL;
+ continue; /* skip to next while() iteration to bail out */
}
chunk_tag = BE_32(&preamble[0]);
@@ -148,6 +148,8 @@ static void *demux_smjpeg_loop (void *this_gen) {
pts = BE_32(&preamble[4]);
pts *= 90;
+//printf ("sending %s frame with pts %lld (timestamp = %d ms)\n",
+// (chunk_tag == sndD_TAG) ? "audio" : "video", pts, BE_32(&preamble[4]));
/* break up the data into packets and dispatch them */
if (((chunk_tag == sndD_TAG) && this->audio_fifo && this->audio_type) ||
(chunk_tag == vidD_TAG)) {
@@ -196,7 +198,6 @@ static void *demux_smjpeg_loop (void *this_gen) {
}
-#if 1
/* wait before sending end buffers: user might want to do a new seek */
while(this->send_end_buffers && this->video_fifo->size(this->video_fifo) &&
this->status != DEMUX_OK){
@@ -204,7 +205,6 @@ static void *demux_smjpeg_loop (void *this_gen) {
xine_usec_sleep(100000);
pthread_mutex_lock( &this->mutex );
}
-#endif
} while (this->status == DEMUX_OK);
@@ -452,7 +452,7 @@ this->video_type = BUF_VIDEO_JPEG;
pthread_mutex_unlock(&this->mutex);
- return this->status;
+ return DEMUX_OK;
}
static int demux_smjpeg_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c
index b75411914..8ec064762 100644
--- a/src/demuxers/demux_wav.c
+++ b/src/demuxers/demux_wav.c
@@ -20,7 +20,7 @@
* MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net)
* based on WAV specs that are available far and wide
*
- * $Id: demux_wav.c,v 1.6 2002/07/19 14:07:38 pmhahn Exp $
+ * $Id: demux_wav.c,v 1.7 2002/08/01 03:56:31 tmmm Exp $
*
*/
@@ -157,6 +157,10 @@ static void *demux_wav_loop (void *this_gen) {
printf ("demux_wav: demux loop finished (status: %d)\n",
this->status);
+ /* seek back to the beginning of the data in preparation for another
+ * start */
+ this->input->seek(this->input, this->data_start, SEEK_SET);
+
this->status = DEMUX_FINISHED;
if (this->send_end_buffers) {
@@ -316,7 +320,7 @@ static int demux_wav_start (demux_plugin_t *this_gen,
this->wave->nChannels,
ngettext("channel", "channels", this->wave->nChannels));
xine_log(this->xine, XINE_LOG_FORMAT,
- _("demux_wav: running time = %d min, %d sec\n"),
+ _("demux_wav: running time = %lld min, %lld sec\n"),
this->data_size / this->wave->nAvgBytesPerSec / 60,
this->data_size / this->wave->nAvgBytesPerSec % 60);
xine_log(this->xine, XINE_LOG_FORMAT,
@@ -359,7 +363,7 @@ static int demux_wav_start (demux_plugin_t *this_gen,
pthread_mutex_unlock(&this->mutex);
- return this->status;
+ return DEMUX_OK;
}
static int demux_wav_seek (demux_plugin_t *this_gen,