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
25836606
Commit
25836606
authored
Nov 29, 2011
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec: Add an init function that can do custom codec context initialization
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
7bb3e625
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
rtpdec.h
libavformat/rtpdec.h
+1
-0
rtsp.c
libavformat/rtsp.c
+6
-0
No files found.
libavformat/rtpdec.h
View file @
25836606
...
@@ -122,6 +122,7 @@ struct RTPDynamicProtocolHandler_s {
...
@@ -122,6 +122,7 @@ struct RTPDynamicProtocolHandler_s {
* require any custom depacketization code. */
* require any custom depacketization code. */
// may be null
// may be null
int
(
*
init
)(
AVFormatContext
*
s
,
int
st_index
,
PayloadContext
*
priv_data
);
///< Initialize dynamic protocol handler, called after the full rtpmap line is parsed
int
(
*
parse_sdp_a_line
)
(
AVFormatContext
*
s
,
int
(
*
parse_sdp_a_line
)
(
AVFormatContext
*
s
,
int
st_index
,
int
st_index
,
PayloadContext
*
priv_data
,
PayloadContext
*
priv_data
,
...
...
libavformat/rtsp.c
View file @
25836606
...
@@ -251,6 +251,9 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
...
@@ -251,6 +251,9 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
default:
default:
break
;
break
;
}
}
if
(
rtsp_st
->
dynamic_handler
&&
rtsp_st
->
dynamic_handler
->
init
)
rtsp_st
->
dynamic_handler
->
init
(
s
,
st
->
index
,
rtsp_st
->
dynamic_protocol_context
);
return
0
;
return
0
;
}
}
...
@@ -387,6 +390,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
...
@@ -387,6 +390,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
handler
=
ff_rtp_handler_find_by_id
(
handler
=
ff_rtp_handler_find_by_id
(
rtsp_st
->
sdp_payload_type
,
st
->
codec
->
codec_type
);
rtsp_st
->
sdp_payload_type
,
st
->
codec
->
codec_type
);
init_rtp_handler
(
handler
,
rtsp_st
,
st
->
codec
);
init_rtp_handler
(
handler
,
rtsp_st
,
st
->
codec
);
if
(
handler
&&
handler
->
init
)
handler
->
init
(
s
,
st
->
index
,
rtsp_st
->
dynamic_protocol_context
);
}
}
}
}
/* put a default control url */
/* put a default control url */
...
...
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