summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-29 01:32:03 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-29 01:32:03 +0300
commit4a36b51ea62bae47ea9bf8df3031c88a1992b7a6 (patch)
tree8ade74ff57f052e87f36b763703ffc03af823001 /stream
parentc73217c07a98013887f507849c18eeac1257df58 (diff)
parent45b7b9374bb2a772baa34a52d1abac11c939de15 (diff)
downloadmpv-4a36b51ea62bae47ea9bf8df3031c88a1992b7a6.tar.bz2
mpv-4a36b51ea62bae47ea9bf8df3031c88a1992b7a6.tar.xz
Merge svn changes up to r29455
Diffstat (limited to 'stream')
-rw-r--r--stream/realrtsp/real.c4
-rw-r--r--stream/stream_cdda.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index d81b265bab..b8f943c8e0 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -382,10 +382,14 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
ph.flags=0;
*buffer = xbuffer_ensure_size(*buffer, 12+size);
if(rdt_rawdata) {
+ if (size < 12)
+ return 0;
n=rtsp_read_data(rtsp_session, *buffer, size-12);
return (n <= 0) ? 0 : n;
}
rmff_dump_pheader(&ph, *buffer);
+ if (size < 12)
+ return 0;
size-=12;
n=rtsp_read_data(rtsp_session, (*buffer)+12, size);
diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c
index 90172c46c7..707a5d9a51 100644
--- a/stream/stream_cdda.c
+++ b/stream/stream_cdda.c
@@ -346,7 +346,7 @@ static int fill_buffer(stream_t* s, char* buffer, int max_len) {
if (!buf)
return 0;
-#ifdef WORDS_BIGENDIAN
+#if HAVE_BIGENDIAN
for(i=0;i<CD_FRAMESIZE_RAW/2;i++)
buf[i]=le2me_16(buf[i]);
#endif