[FFmpeg-soc] [soc]: r5725 - mms/mmst.c
spyfeng
subversion at mplayerhq.hu
Sat Mar 27 16:58:04 CET 2010
Author: spyfeng
Date: Sat Mar 27 16:58:04 2010
New Revision: 5725
Log:
use if() else clause instead of switch() case,
because we expect to receive media packet.
Modified:
mms/mmst.c
Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c Sat Mar 27 16:36:24 2010 (r5724)
+++ mms/mmst.c Sat Mar 27 16:58:04 2010 (r5725)
@@ -468,22 +468,18 @@ static int read_mms_packet(MMSContext *m
} else {
/* Read from network */
packet_type= get_tcp_server_response(mms);
- switch (packet_type) {
- case SC_PKT_ASF_MEDIA:
- if(mms->pkt_buf_len>mms->asf_packet_len) {
+ if (packet_type == SC_PKT_ASF_MEDIA) {
+ if(mms->pkt_buf_len>mms->asf_packet_len) {
dprintf(NULL, "Incoming packet"
"larger than the asf packet size stated (%d>%d)\n",
mms->pkt_buf_len, mms->asf_packet_len);
result= AVERROR_IO;
- break;
- }
-
+ } else {
// copy the data to the packet buffer.
read_data(mms, buf, buf_size, &result);
- break;
- default:
+ }
+ } else {
dprintf(NULL, "Got a unkown Packet Type: 0x%x\n", packet_type);
- break;
}
}
} while(!result); // only return one packet.
More information about the FFmpeg-soc
mailing list