diff options
author | Thomas Viehmann <tv@beamnet.de> | 2009-01-01 18:12:40 +0100 |
---|---|---|
committer | Thomas Viehmann <tv@beamnet.de> | 2009-01-01 18:12:40 +0100 |
commit | afe8c9f28dcde837df80e473c66ef8e4078b3d5d (patch) | |
tree | 89fd0f5ef613eb07246ae0734f37cda48cc74dfe | |
parent | 7caa938a4628d487332f4b52c1a571fe8084a9b0 (diff) | |
download | xine-lib-afe8c9f28dcde837df80e473c66ef8e4078b3d5d.tar.gz xine-lib-afe8c9f28dcde837df80e473c66ef8e4078b3d5d.tar.bz2 |
check return value of input->read_block for NULL in yuv_frames demuxing
Based on a patch by Matthias Hopf <mhopf@suse.de>.
-rw-r--r-- | src/demuxers/demux_yuv_frames.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/demuxers/demux_yuv_frames.c b/src/demuxers/demux_yuv_frames.c index c5ca363ed..089207f58 100644 --- a/src/demuxers/demux_yuv_frames.c +++ b/src/demuxers/demux_yuv_frames.c @@ -126,13 +126,19 @@ static void demux_yuv_frames_send_headers (demux_plugin_t *this_gen){ if(_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO)) { buf = this->input->read_block(this->input, this->audio_fifo, 0); - this->audio_fifo->put(this->audio_fifo, buf); + if (buf) + this->audio_fifo->put(this->audio_fifo, buf); + else + this->status = DEMUX_FINISHED; } if(_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO)) { buf = this->input->read_block(this->input, this->video_fifo, 0); - this->video_fifo->put(this->video_fifo, buf); + if (buf) + this->video_fifo->put(this->video_fifo, buf); + else + this->status = DEMUX_FINISHED; } this->status = DEMUX_OK; |