Commit 3c5962b1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: cosmetic fixes

parent f380c1a0
...@@ -690,20 +690,22 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, ...@@ -690,20 +690,22 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
/* /*
* If the rtp payload type is unknown then check demux if it is specified * If the rtp payload type is unknown then check demux if it is specified
*/ */
if ((strcmp(demux->psz_demux, "h264") == 0) || (strcmp(demux->psz_demux, "ts") == 0)) if (!strcmp(demux->psz_demux, "h264")
|| !strcmp(demux->psz_demux, "ts"))
{ {
msg_Dbg (demux, "rtp autodetect specified demux=%s", demux->psz_demux); msg_Dbg (demux, "dynamic payload format %s specified by demux",
pt.init = demux_init; demux->psz_demux);
pt.destroy = stream_destroy; pt.init = demux_init;
pt.decode = stream_decode; pt.destroy = stream_destroy;
pt.frequency = 90000; pt.decode = stream_decode;
break; pt.frequency = 90000;
break;
} }
else if (ptype >= 96) if (ptype >= 96)
{ {
char *dynamic = var_InheritString(demux, "rtp-dynamic-pt"); char *dynamic = var_InheritString(demux, "rtp-dynamic-pt");
if (dynamic == NULL) if (dynamic == NULL)
return -1; ;
else if (!strcmp(dynamic, "theora")) else if (!strcmp(dynamic, "theora"))
{ {
msg_Dbg (demux, "assuming Theora Encoded Video"); msg_Dbg (demux, "assuming Theora Encoded Video");
...@@ -713,18 +715,11 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, ...@@ -713,18 +715,11 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
pt.frequency = 90000; pt.frequency = 90000;
} }
else else
{
msg_Err (demux, "invalid dynamic payload format `%s' " msg_Err (demux, "invalid dynamic payload format `%s' "
"specified", dynamic); "specified", dynamic);
free(dynamic); free (dynamic);
return -1;
}
free(dynamic);
}
else
{
return -1;
} }
return -1;
} }
rtp_add_type (demux, session, &pt); rtp_add_type (demux, session, &pt);
return 0; return 0;
......
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