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
4438d1c6
Commit
4438d1c6
authored
Feb 08, 2015
by
Gilles Chanteperdrix
Committed by
Martin Storsjö
Feb 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtsp: parse lang attribute in SDP
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
1ec28a66
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
rtsp.c
libavformat/rtsp.c
+12
-0
rtsp.h
libavformat/rtsp.h
+2
-0
version.h
libavformat/version.h
+1
-1
No files found.
libavformat/rtsp.c
View file @
4438d1c6
...
...
@@ -470,6 +470,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
handler
->
init
(
s
,
st
->
index
,
rtsp_st
->
dynamic_protocol_context
);
}
if
(
rt
->
default_lang
[
0
])
av_dict_set
(
&
st
->
metadata
,
"language"
,
rt
->
default_lang
,
0
);
}
/* put a default control url */
av_strlcpy
(
rtsp_st
->
control_url
,
rt
->
control_uri
,
...
...
@@ -533,6 +535,16 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
/* AV_NOPTS_VALUE means live broadcast (and can't seek) */
s
->
duration
=
(
end
==
AV_NOPTS_VALUE
)
?
AV_NOPTS_VALUE
:
end
-
start
;
}
else
if
(
av_strstart
(
p
,
"lang:"
,
&
p
))
{
if
(
s
->
nb_streams
>
0
)
{
get_word
(
buf1
,
sizeof
(
buf1
),
&
p
);
rtsp_st
=
rt
->
rtsp_streams
[
rt
->
nb_rtsp_streams
-
1
];
if
(
rtsp_st
->
stream_index
>=
0
)
{
st
=
s
->
streams
[
rtsp_st
->
stream_index
];
av_dict_set
(
&
st
->
metadata
,
"language"
,
buf1
,
0
);
}
}
else
get_word
(
rt
->
default_lang
,
sizeof
(
rt
->
default_lang
),
&
p
);
}
else
if
(
av_strstart
(
p
,
"IsRealDataType:integer;"
,
&
p
))
{
if
(
atoi
(
p
)
==
1
)
rt
->
transport
=
RTSP_TRANSPORT_RDT
;
...
...
libavformat/rtsp.h
View file @
4438d1c6
...
...
@@ -395,6 +395,8 @@ typedef struct RTSPState {
* Size of RTP packet reordering queue.
*/
int
reordering_queue_size
;
char
default_lang
[
4
];
}
RTSPState
;
#define RTSP_FLAG_FILTER_SRC 0x1
/**< Filter incoming UDP packets -
...
...
libavformat/version.h
View file @
4438d1c6
...
...
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 56
#define LIBAVFORMAT_VERSION_MINOR 12
#define LIBAVFORMAT_VERSION_MICRO
0
#define LIBAVFORMAT_VERSION_MICRO
1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
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