Commit 927dda74 authored by Mickaël Turnel's avatar Mickaël Turnel
Browse files

Fix H264 not using defined MTU

parent 3f94be99
...@@ -57,7 +57,9 @@ typedef struct Rfc3984Context{ ...@@ -57,7 +57,9 @@ typedef struct Rfc3984Context{
bool_t initialized_ref_cseq; bool_t initialized_ref_cseq;
} Rfc3984Context; } Rfc3984Context;
MS2_PUBLIC Rfc3984Context *rfc3984_new(void); MS2_DEPRECATED MS2_PUBLIC Rfc3984Context *rfc3984_new(void);
MS2_PUBLIC Rfc3984Context *rfc3984_new_with_factory(MSFactory *factory);
MS2_PUBLIC void rfc3984_destroy(Rfc3984Context *ctx); MS2_PUBLIC void rfc3984_destroy(Rfc3984Context *ctx);
void rfc3984_init(Rfc3984Context *ctx); void rfc3984_init(Rfc3984Context *ctx);
...@@ -180,7 +180,7 @@ static void enc_preprocess(MSFilter *f) { ...@@ -180,7 +180,7 @@ static void enc_preprocess(MSFilter *f) {
enc_configure(d); enc_configure(d);
d->packer = rfc3984_new(); d->packer = rfc3984_new_with_factory(f->factory);
rfc3984_set_mode(d->packer, d->mode); rfc3984_set_mode(d->packer, d->mode);
rfc3984_enable_stap_a(d->packer, FALSE); rfc3984_enable_stap_a(d->packer, FALSE);
ms_video_starter_init(&d->starter); ms_video_starter_init(&d->starter);
...@@ -66,6 +66,13 @@ void rfc3984_set_max_payload_size(Rfc3984Context *ctx, int size){ ...@@ -66,6 +66,13 @@ void rfc3984_set_max_payload_size(Rfc3984Context *ctx, int size){
ctx->maxsz=size; ctx->maxsz=size;
} }
Rfc3984Context *rfc3984_new_with_factory(MSFactory *factory){
Rfc3984Context *ctx=ms_new0(Rfc3984Context,1);
rfc3984_set_max_payload_size(ctx, ms_factory_get_payload_max_size(factory));
return ctx;
static void send_packet(Rfc3984Context *ctx, MSQueue *rtpq, uint32_t ts, mblk_t *m, bool_t marker){ static void send_packet(Rfc3984Context *ctx, MSQueue *rtpq, uint32_t ts, mblk_t *m, bool_t marker){
mblk_set_timestamp_info(m,ts); mblk_set_timestamp_info(m,ts);
mblk_set_marker_info(m,marker); mblk_set_marker_info(m,marker);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment