Author: spyfeng
Date: Thu Jul 15 17:09:43 2010
New Revision: 5855
Log:
check the error code sent back from server.
if hr is not 0x00000000, the message sent from client may be broken.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Fri Jul 9 21:47:19 2010 (r5854)
+++ mms/mmst.c Thu Jul 15 17:09:43 2010 (r5855)
@@ -265,6 +265,7 @@ static MMSSCPacketType get_tcp_server_re
read_result= url_read_complete(mms->mms_hd, mms->in_buffer+8,
4);
if(read_result == 4) {
int length_remaining= AV_RL32(mms->in_buffer+8) + 4;
+ int hr;
dprintf(NULL, "Length remaining is %d\n",
length_remaining);
// read the rest of the packet.
@@ -282,6 +283,12 @@ static MMSSCPacketType get_tcp_server_re
dprintf(NULL, "read for packet type failed%d!\n",
read_result);
return -1;
}
+ hr = AV_RL32(mms->in_buffer + 40);
+ if (hr)
+ {
+ dprintf(NULL, "The server side send back error
code:0x%x\n", hr);
+ return -1;
+ }
} else {
dprintf(NULL, "read for length remaining failed%d!\n",
read_result);
return -1;
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc