summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_ipmovie.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/demux_ipmovie.c')
-rw-r--r--src/demuxers/demux_ipmovie.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c
index cc0d0fa5d..76c26cb2d 100644
--- a/src/demuxers/demux_ipmovie.c
+++ b/src/demuxers/demux_ipmovie.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_ipmovie.c,v 1.4 2003/01/10 11:57:16 miguelfreitas Exp $
+ * $Id: demux_ipmovie.c,v 1.5 2003/01/17 16:52:35 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -341,31 +341,35 @@ this->fps++; /* above calculation usually yields 14.9; we need 15 */
debug_ipmovie (" sending audio frame with pts %lld (%d audio frames)\n",
audio_pts, this->audio_frame_count);
- while (opcode_size) {
- buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
- buf->type = this->audio_type;
- buf->extra_info->input_pos = current_file_pos;
- buf->extra_info->input_length = this->data_size;
- buf->extra_info->input_time = audio_pts / 90;
- buf->pts = audio_pts;
-
- if (opcode_size > buf->max_size)
- buf->size = buf->max_size;
- else
- buf->size = opcode_size;
- opcode_size -= buf->size;
-
- if (this->input->read(this->input, buf->content, buf->size) !=
- buf->size) {
- buf->free_buffer(buf);
- chunk_type = CHUNK_BAD;
- break;
+ if(this->audio_fifo) {
+ while (opcode_size) {
+ buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
+ buf->type = this->audio_type;
+ buf->extra_info->input_pos = current_file_pos;
+ buf->extra_info->input_length = this->data_size;
+ buf->extra_info->input_time = audio_pts / 90;
+ buf->pts = audio_pts;
+
+ if (opcode_size > buf->max_size)
+ buf->size = buf->max_size;
+ else
+ buf->size = opcode_size;
+ opcode_size -= buf->size;
+
+ if (this->input->read(this->input, buf->content, buf->size) !=
+ buf->size) {
+ buf->free_buffer(buf);
+ chunk_type = CHUNK_BAD;
+ break;
+ }
+
+ if (!opcode_size)
+ buf->decoder_flags |= BUF_FLAG_FRAME_END;
+
+ this->audio_fifo->put (this->audio_fifo, buf);
}
-
- if (!opcode_size)
- buf->decoder_flags |= BUF_FLAG_FRAME_END;
-
- this->audio_fifo->put (this->audio_fifo, buf);
+ }else{
+ this->input->seek(this->input, opcode_size, SEEK_CUR);
}
break;