diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-13 17:33:04 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-13 17:33:04 +0100 |
commit | b9dc65ff35387961d9526f5c443f9af43a3c1909 (patch) | |
tree | 88011028b413e4fb50d50eb2402427401b58ea56 /src/demuxers/demux_real.c | |
parent | 4aef516243988c11ad23ed11c373228598f3e48b (diff) | |
download | xine-lib-b9dc65ff35387961d9526f5c443f9af43a3c1909.tar.gz xine-lib-b9dc65ff35387961d9526f5c443f9af43a3c1909.tar.bz2 |
Check for allocation failures.
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r-- | src/demuxers/demux_real.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 27f7a2634..fdb913ef4 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -365,6 +365,10 @@ static void real_parse_audio_specific_data (demux_real_t *this, stream->frame_num_bytes = 0; stream->sub_packet_cnt = 0; + if (!stream->frame_buffer) + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, + "demux_real: failed to allocate the audio frame buffer!\n"); + xprintf (this->stream->xine, XINE_VERBOSITY_LOG, "demux_real: buf type 0x%08x frame size %zu block align %d\n", stream->buf_type, stream->frame_size, stream->block_align); @@ -1373,6 +1377,11 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { int x; off_t pos; + if (!buffer) { + this->status = DEMUX_FINISHED; + return this->status; + } + switch (this->audio_stream->buf_type) { case BUF_AUDIO_28_8: for (x = 0; x < sph / 2; x++) { |