[FFmpeg-devel] [PATCH] RTP H.264 / AVC support

Luca Abeni lucabe72
Wed Jun 16 09:46:02 CEST 2010


On 06/16/2010 09:26 AM, Howard Chu wrote:
>>>> After that, we can move to the rtpenc* part (yesterday I tried my
>>>> ff_avc_find_startcode_avc() idea, and I think it can allow to simplify
>>>> the code a little bit). In particular, I am still not sure about the
>>>> need for the "NALP" data type.
>>> Thanks for getting the sdp part fixed. What do we need to do now for
>>> rtpenc?
>> I think you started discussing with Michael about exporting the NAL
>> parsing code from h264.c, right?
> Oh, actually I was waiting to see what idea you had first. You mentioned
> above, an idea about ff_avc_find_startcode_avc(). You've already seen
> what I came up with...

It was just an idea... I attach a still-not-finished (works for me, but
it's still unclean in some parts... In particular, I still need to reuse
the avc_mp4_find_startcode() in other places) patch, which gives the idea.
The good point about it is that it's simple.

>> I was going to commit the rtpenc.* part of the patch (adding
>> nal_length_size to struct RTPMuxContext), but then I noticed:
>> s->nal_length_size = ((*(((char*)(st->codec->extradata))+4))&0x03)+1;
>> and I am wondering why casting extradata to (char *)... I think this
>> can be simplifed to
>> s->nal_length_size = (st->codec->extradata[4]& 0x03) + 1;
>> what do you think?
> Sounds good.

Ok, good; I'll commit it later.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtp_h264_1.diff
Type: text/x-diff
Size: 1619 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100616/25f7d5dd/attachment.diff>

More information about the ffmpeg-devel mailing list