Hi, On 25 June 2010 16:10, Luca Barbato <lu_zero@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.