Author: spyfeng Date: Thu Jul 15 17:25:40 2010 New Revision: 5856 Log: make send message is 8 bytes aligned to solve the bug that client receive the message with error code from server side.
Modified: mms/mmst.c Modified: mms/mmst.c ============================================================================== --- mms/mmst.c Thu Jul 15 17:09:43 2010 (r5855) +++ mms/mmst.c Thu Jul 15 17:25:40 2010 (r5856) @@ -150,7 +150,8 @@ static void insert_command_prefixes(MMSC /** Send a prepared MMST command packet. */ static int send_command_packet(MMSContext *mms) { - int exact_length= mms->write_out_ptr - mms->out_buffer; + int len= mms->write_out_ptr - mms->out_buffer; + int exact_length = (len + 7) & ~7; int first_length= exact_length - 16; int len8= first_length/8; int write_result; @@ -159,6 +160,7 @@ static int send_command_packet(MMSContex AV_WL32(mms->out_buffer + 8, first_length); AV_WL32(mms->out_buffer + 16, len8); AV_WL32(mms->out_buffer + 32, len8-2); + memset(mms->write_out_ptr, 0, exact_length - len); // write it out. write_result= url_write(mms->mms_hd, mms->out_buffer, exact_length); _______________________________________________ FFmpeg-soc mailing list FFmpeg-soc@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc