summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-24 09:41:41 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-24 09:41:41 +0000
commit64fb0e7cd3c6c8acf4cd0d422459885db8302ac7 (patch)
tree702e57ff0a1f74ac6f0152de9b9757bcfd79ef2c /libmpdemux
parentc3fafa8324cb4ba6617e9c70b2a71f139ee35463 (diff)
downloadmpv-64fb0e7cd3c6c8acf4cd0d422459885db8302ac7.tar.bz2
mpv-64fb0e7cd3c6c8acf4cd0d422459885db8302ac7.tar.xz
exit() is not allowed in any other function than main(); removed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18808 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/rtp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libmpdemux/rtp.c b/libmpdemux/rtp.c
index c5b1565415..5747f9ab27 100644
--- a/libmpdemux/rtp.c
+++ b/libmpdemux/rtp.c
@@ -84,6 +84,8 @@ static int rtp_cache(int fd, char *buffer, int length)
static int is_first = 1;
getrtp2(fd, &rh, &data, &length);
+ if(!length)
+ return 0;
seq = rh.b.sequence;
newseq = seq - rtpbuf.seq[rtpbuf.first];
@@ -350,15 +352,13 @@ static int getrtp2(int fd, struct rtpheader *rh, char** data, int* lengthData) {
int headerSize;
int lengthPacket;
lengthPacket=recv(fd,buf,1590,0);
- if (lengthPacket==0)
- exit(1);
- if (lengthPacket<0) {
+ if (lengthPacket<0)
mp_msg(MSGT_NETWORK,MSGL_ERR,"rtp: socket read error\n");
- exit(2);
- }
- if (lengthPacket<12) {
+ else if (lengthPacket<12)
mp_msg(MSGT_NETWORK,MSGL_ERR,"rtp: packet too small (%d) to be an rtp frame (>12bytes)\n", lengthPacket);
- exit(3);
+ if(lengthPacket<12) {
+ *lengthData = 0;
+ return 0;
}
rh->b.v = (unsigned int) ((buf[0]>>6)&0x03);
rh->b.p = (unsigned int) ((buf[0]>>5)&0x01);