#include "rtpdec_h263.h"
#include "rtpdec_h264.h"
#include "rtpdec_mpeg4.h"
+#include "rtpdec_svq3.h"
#include "rtpdec_xiph.h"
//#define DEBUG
ff_register_dynamic_payload_handler(&ff_h264_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_vorbis_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_theora_dynamic_handler);
+ ff_register_dynamic_payload_handler(&ff_svq3_dynamic_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfv_handler);
ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);
}
av_free(s);
}
+
+int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p,
+ int (*parse_fmtp)(AVStream *stream,
+ PayloadContext *data,
+ char *attr, char *value))
+{
+ char attr[256];
+ char *value;
+ int res;
+ int value_size = strlen(p) + 1;
+
+ if (!(value = av_malloc(value_size))) {
+ av_log(stream, AV_LOG_ERROR, "Failed to allocate data for FMTP.");
+ return AVERROR(ENOMEM);
+ }
+
+ // remove protocol identifier
+ while (*p && *p == ' ') p++; // strip spaces
+ while (*p && *p != ' ') p++; // eat protocol identifier
+ while (*p && *p == ' ') p++; // strip trailing spaces
+
+ while (ff_rtsp_next_attr_and_value(&p,
+ attr, sizeof(attr),
+ value, value_size)) {
+
+ res = parse_fmtp(stream, data, attr, value);
+ if (res < 0 && res != AVERROR_PATCHWELCOME) {
+ av_free(value);
+ return res;
+ }
+ }
+ av_free(value);
+ return 0;
+}