[FFmpeg-soc] [soc]: r5681 - mms/mmst.c

Ronald S. Bultje rsbultje at gmail.com
Mon Mar 22 16:57:24 CET 2010


Hi Zhentan,

On Sun, Mar 21, 2010 at 12:21 PM, zhentan feng <spyfeng at gmail.com> wrote:
> On Sat, Mar 20, 2010 at 9:46 PM, Ronald S. Bultje <rsbultje at gmail.com>
> wrote:
>> On Sat, Mar 20, 2010 at 9:30 AM, spyfeng <subversion at mplayerhq.hu> wrote:
>> >  static void pad_media_packet(MMSContext *mms)
>> >  {
>> > -    if(mms->media_packet_buffer_length<mms->asf_packet_len) {
>> > +    if(mms->pkt_buf_len<mms->asf_packet_len) {
>> >         int padding_size = mms->asf_packet_len
>> > -                           - mms->media_packet_buffer_length;
>> > +                           - mms->pkt_buf_len;
>> >         memset(mms->media_packet_incoming_buffer
>> > -               + mms->media_packet_buffer_length, 0, padding_size);
>> > -        mms->media_packet_buffer_length += padding_size;
>> > +               + mms->pkt_buf_len, 0, padding_size);
>> > +        mms->pkt_buf_len += padding_size;
>> >     }
>>
>> rtp_asf.c modifies min_pkt_len in the ASF header to zero so we don't
>> have to do this, you could use such code also (or even share it).
>
> yes, I find that in rtpdec_asf.c.
> there is a function rtp_asf_fix_header(), which set min_pkt_len as 0.
> But I am not clear why should do this for mms protocol, it seems that there
> no relationship between the pad size and min_pkt_len.
> could you please explain this, maybe I miss some important point.

Hm, I had a look and it appears that RTSP-MS sets a smaller than
default pkt_size per pkt, whereas MMS simply doesn't specify it. The
result is that you have to pad... So nevermind for now.

Ronald


More information about the FFmpeg-soc mailing list