summaryrefslogtreecommitdiff
path: root/xine_input_vdr.c
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-09-14 22:56:10 +0000
committerphintuka <phintuka>2007-09-14 22:56:10 +0000
commit3a480ee141f05e74b76f162478c7d0f236cc499d (patch)
treeb15132db1a9aa976f9110df84a06b18b3e7175e3 /xine_input_vdr.c
parent5e572567d5140dcc4bdd760c6d869eede057047a (diff)
downloadxineliboutput-3a480ee141f05e74b76f162478c7d0f236cc499d.tar.gz
xineliboutput-3a480ee141f05e74b76f162478c7d0f236cc499d.tar.bz2
vdr_x_demux_control_newpts:
- fix null pointer dereferencing when last element of audio fifo was consumed for video. - use proper fifos for buffers - check if fifos exist
Diffstat (limited to 'xine_input_vdr.c')
-rw-r--r--xine_input_vdr.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index fb9c87fb..8ce72daf 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.93 2007-09-13 21:24:07 phintuka Exp $
+ * $Id: xine_input_vdr.c,v 1.94 2007-09-14 22:56:10 phintuka Exp $
*
*/
@@ -2308,23 +2308,24 @@ static void vdr_x_demux_control_newpts( xine_stream_t *stream, int64_t pts,
{
buf_element_t *buf;
- buf = stream->audio_fifo->buffer_pool_try_alloc (stream->audio_fifo);
+ buf = stream->video_fifo ? stream->video_fifo->buffer_pool_try_alloc (stream->video_fifo) : NULL;
if(buf) {
buf->type = BUF_CONTROL_NEWPTS;
buf->decoder_flags = flags;
buf->disc_off = pts;
stream->video_fifo->put (stream->video_fifo, buf);
- } else {
- LOGMSG("vdr_x_demux_control_newpts BUFFER FULL!");
+ } else {
+ LOGMSG("vdr_x_demux_control_newpts: video fifo full !");
}
- if(buf) {
- buf = stream->audio_fifo->buffer_pool_try_alloc (stream->audio_fifo);
+
+ buf = stream->audio_fifo ? stream->audio_fifo->buffer_pool_try_alloc (stream->audio_fifo) : NULL;
+ if (buf) {
buf->type = BUF_CONTROL_NEWPTS;
buf->decoder_flags = flags;
buf->disc_off = pts;
stream->audio_fifo->put (stream->audio_fifo, buf);
} else {
- LOGMSG("vdr_x_demux_control_newpts BUFFER FULL!");
+ LOGMSG("vdr_x_demux_control_newpts: audio fifo full !");
}
}