Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
6af92f68
Commit
6af92f68
authored
Nov 04, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: print an explanatory error in case of dynamic payload format
parent
3c5962b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
modules/access/rtp/input.c
modules/access/rtp/input.c
+1
-2
modules/access/rtp/rtp.c
modules/access/rtp/rtp.c
+12
-5
modules/access/rtp/rtp.h
modules/access/rtp/rtp.h
+1
-1
No files found.
modules/access/rtp/input.c
View file @
6af92f68
...
@@ -69,8 +69,7 @@ static void rtp_process (demux_t *demux, block_t *block)
...
@@ -69,8 +69,7 @@ static void rtp_process (demux_t *demux, block_t *block)
/* TODO: use SDP and get rid of this hack */
/* TODO: use SDP and get rid of this hack */
if
(
unlikely
(
sys
->
autodetect
))
if
(
unlikely
(
sys
->
autodetect
))
{
/* Autodetect payload type, _before_ rtp_queue() */
{
/* Autodetect payload type, _before_ rtp_queue() */
if
(
rtp_autodetect
(
demux
,
sys
->
session
,
block
))
rtp_autodetect
(
demux
,
sys
->
session
,
block
);
goto
drop
;
sys
->
autodetect
=
false
;
sys
->
autodetect
=
false
;
}
}
...
...
modules/access/rtp/rtp.c
View file @
6af92f68
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <vlc_demux.h>
#include <vlc_demux.h>
#include <vlc_network.h>
#include <vlc_network.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_dialog.h>
#include "rtp.h"
#include "rtp.h"
#ifdef HAVE_SRTP
#ifdef HAVE_SRTP
...
@@ -613,8 +614,8 @@ static void *ts_init (demux_t *demux)
...
@@ -613,8 +614,8 @@ static void *ts_init (demux_t *demux)
/* Not using SDP, we need to guess the payload format used */
/* Not using SDP, we need to guess the payload format used */
/* see http://www.iana.org/assignments/rtp-parameters */
/* see http://www.iana.org/assignments/rtp-parameters */
int
rtp_autodetect
(
demux_t
*
demux
,
rtp_session_t
*
session
,
void
rtp_autodetect
(
demux_t
*
demux
,
rtp_session_t
*
session
,
const
block_t
*
block
)
const
block_t
*
block
)
{
{
uint8_t
ptype
=
rtp_ptype
(
block
);
uint8_t
ptype
=
rtp_ptype
(
block
);
rtp_pt_t
pt
=
{
rtp_pt_t
pt
=
{
...
@@ -715,14 +716,20 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session,
...
@@ -715,14 +716,20 @@ 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
,
"
unknown
dynamic payload format `%s' "
"specified"
,
dynamic
);
"specified"
,
dynamic
);
free
(
dynamic
);
free
(
dynamic
);
}
}
return
-
1
;
msg_Err
(
demux
,
"unspecified payload format (type %"
PRIu8
")"
,
ptype
);
msg_Info
(
demux
,
"A valid SDP is needed to parse this RTP stream."
);
dialog_Fatal
(
demux
,
N_
(
"SDP required"
),
N_
(
"A description in SDP format is required to receive the RTP "
"stream. Note that rtp:// URIs cannot work with dynamic "
"RTP payload format (%"
PRIu8
")."
),
ptype
);
return
;
}
}
rtp_add_type
(
demux
,
session
,
&
pt
);
rtp_add_type
(
demux
,
session
,
&
pt
);
return
0
;
}
}
/*
/*
...
...
modules/access/rtp/rtp.h
View file @
6af92f68
...
@@ -32,7 +32,7 @@ struct rtp_pt_t
...
@@ -32,7 +32,7 @@ struct rtp_pt_t
uint32_t
frequency
;
/* RTP clock rate (Hz) */
uint32_t
frequency
;
/* RTP clock rate (Hz) */
uint8_t
number
;
uint8_t
number
;
};
};
int
rtp_autodetect
(
demux_t
*
,
rtp_session_t
*
,
const
block_t
*
);
void
rtp_autodetect
(
demux_t
*
,
rtp_session_t
*
,
const
block_t
*
);
static
inline
uint8_t
rtp_ptype
(
const
block_t
*
block
)
static
inline
uint8_t
rtp_ptype
(
const
block_t
*
block
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment