[FFmpeg-soc] [PATCH] fmtp cleanup

Josh Allmann joshua.allmann at gmail.com
Sat Jun 26 05:18:13 CEST 2010


Hi,

On 25 June 2010 16:10, Luca Barbato <lu_zero at gentoo.org> wrote:
> On 06/26/2010 12:28 AM, Josh Allmann wrote:
>> Hi,
>>
>> This cleans up FMTP parsing code somewhat. I only did it for H.264 and
>> MPEG-4/AAC; if this approach is OK, I'll do the rest (Xiph, AMR, etc).
>>
>> 0002 -- self explanatory. It is likely I will have to change
>> value[4096] to be malloc'd due to massive Xiph extradata.
>
> +int ff_parse_fmtp(AVFormatContext *s, int st_index,
> +                  void *data, const char *p,
> +                  int (*parse_fmtp)(AVFormatContext *s, int st_index,
> +                                    PayloadContext *data,
> +                                    char *attr, char *value))
>
> Why void data? why AVFormatContext *s, int st_index ? When passing the
> stream isn't enough?
>

Fixed void data.

I was trying to play it safe with passing the format context, but
seems none of the depacketizers need it, so changed to AVStream.

> +    while (!(res = strspn(p, SPACE_CHARS))) p++; // protocol identifier
>
> are you sure you need that?
>

Reverted to the old way of doing things:

+    while (*p && *p != ' ') p++; // eat protocol identifier

>
>> 003-005 -- H.264 related
>
> 0003 Ok
>
> 0004
>
> -            sdp_parse_fmtp_config_h264(stream, h264_data, attr, value);
> -        }
> +        return ff_parse_fmtp(s, st_index, h264_data, p,
> +                      &sdp_parse_fmtp_config_h264);
>
> sdp_parse_fmtp_config_h264 takes a stream as argument ff_parse_fmtp
> parse_fmtp doesn't seem to match the function.
>

Not sure what you mean (I changed the function signature for
sdp_parse_fmtp_config in the other hunk), but that's moot since
ff_parse_fmtp takes a stream now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Move-space_chars-from-avformat-internal-to-rtpdec.patch
Type: text/x-patch
Size: 1515 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Added-generic-function-for-iterating-over-FMTP-extra.patch
Type: text/x-patch
Size: 2260 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Return-ENOMEM-if-H.264-RTP-fails-to-allocate-memory-.patch
Type: text/x-patch
Size: 1525 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Clean-up-FMTP-parsing-code-in-H.264-RTP-depacketizer.patch
Type: text/x-patch
Size: 1555 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-h264-rtp-cosmetics.patch
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Clean-up-FMTP-parsing-code-in-MPEG-4-AAC-RTP-depacke.patch
Type: text/x-patch
Size: 2181 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-mpeg4-aac-rtp-cosmetics.patch
Type: text/x-patch
Size: 2388 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100625/df53cee0/attachment-0006.bin>


More information about the FFmpeg-soc mailing list