Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c385313d
Commit
c385313d
authored
Jun 17, 2014
by
Joshua Kordani
Committed by
Luca Barbato
Jun 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp: Support misordered fmtp rtpmap
Issue present in Avigilon IP cameras.
parent
c9c1e00f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
rtsp.c
libavformat/rtsp.c
+16
-3
No files found.
libavformat/rtsp.c
View file @
c385313d
...
@@ -292,6 +292,9 @@ typedef struct SDPParseState {
...
@@ -292,6 +292,9 @@ typedef struct SDPParseState {
struct
RTSPSource
**
default_include_source_addrs
;
/**< Source-specific multicast include source IP address (from SDP content) */
struct
RTSPSource
**
default_include_source_addrs
;
/**< Source-specific multicast include source IP address (from SDP content) */
int
nb_default_exclude_source_addrs
;
/**< Number of source-specific multicast exclude source IP address (from SDP content) */
int
nb_default_exclude_source_addrs
;
/**< Number of source-specific multicast exclude source IP address (from SDP content) */
struct
RTSPSource
**
default_exclude_source_addrs
;
/**< Source-specific multicast exclude source IP address (from SDP content) */
struct
RTSPSource
**
default_exclude_source_addrs
;
/**< Source-specific multicast exclude source IP address (from SDP content) */
int
seen_rtpmap
;
int
seen_fmtp
;
char
delayed_fmtp
[
2048
];
}
SDPParseState
;
}
SDPParseState
;
static
void
copy_default_source_addrs
(
struct
RTSPSource
**
addrs
,
int
count
,
static
void
copy_default_source_addrs
(
struct
RTSPSource
**
addrs
,
int
count
,
...
@@ -381,7 +384,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
...
@@ -381,7 +384,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
break
;
break
;
case
'm'
:
case
'm'
:
/* new stream */
/* new stream */
s1
->
skip_media
=
0
;
s1
->
skip_media
=
0
;
s1
->
seen_fmtp
=
0
;
s1
->
seen_rtpmap
=
0
;
codec_type
=
AVMEDIA_TYPE_UNKNOWN
;
codec_type
=
AVMEDIA_TYPE_UNKNOWN
;
get_word
(
st_type
,
sizeof
(
st_type
),
&
p
);
get_word
(
st_type
,
sizeof
(
st_type
),
&
p
);
if
(
!
strcmp
(
st_type
,
"audio"
))
{
if
(
!
strcmp
(
st_type
,
"audio"
))
{
...
@@ -504,13 +509,21 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
...
@@ -504,13 +509,21 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
st
=
s
->
streams
[
rtsp_st
->
stream_index
];
st
=
s
->
streams
[
rtsp_st
->
stream_index
];
sdp_parse_rtpmap
(
s
,
st
,
rtsp_st
,
payload_type
,
p
);
sdp_parse_rtpmap
(
s
,
st
,
rtsp_st
,
payload_type
,
p
);
}
}
s1
->
seen_rtpmap
=
1
;
if
(
s1
->
seen_fmtp
)
{
parse_fmtp
(
s
,
rt
,
payload_type
,
s1
->
delayed_fmtp
);
}
}
else
if
(
av_strstart
(
p
,
"fmtp:"
,
&
p
)
||
}
else
if
(
av_strstart
(
p
,
"fmtp:"
,
&
p
)
||
av_strstart
(
p
,
"framesize:"
,
&
p
))
{
av_strstart
(
p
,
"framesize:"
,
&
p
))
{
/* NOTE: fmtp is only supported AFTER the 'a=rtpmap:xxx' tag */
// let dynamic protocol handlers have a stab at the line.
// let dynamic protocol handlers have a stab at the line.
get_word
(
buf1
,
sizeof
(
buf1
),
&
p
);
get_word
(
buf1
,
sizeof
(
buf1
),
&
p
);
payload_type
=
atoi
(
buf1
);
payload_type
=
atoi
(
buf1
);
parse_fmtp
(
s
,
rt
,
payload_type
,
buf
);
if
(
s1
->
seen_rtpmap
)
{
parse_fmtp
(
s
,
rt
,
payload_type
,
buf
);
}
else
{
s1
->
seen_fmtp
=
1
;
av_strlcpy
(
s1
->
delayed_fmtp
,
buf
,
sizeof
(
s1
->
delayed_fmtp
));
}
}
else
if
(
av_strstart
(
p
,
"range:"
,
&
p
))
{
}
else
if
(
av_strstart
(
p
,
"range:"
,
&
p
))
{
int64_t
start
,
end
;
int64_t
start
,
end
;
...
...
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