aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-24 22:33:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-24 22:33:49 +0100
commit4c8a556a773c9706618b8e5d14b68a06631fb79f (patch)
treea5720f08f734268d88502845e0f99ebe4bd8b4e8 /libavformat/rtsp.c
parent2bedcbf82274c08ad137257ed6d81962cf3a9ffd (diff)
parentb7a4c319fda22aa91ce29692d728ec6103b514f6 (diff)
downloadandroid_external_ffmpeg-4c8a556a773c9706618b8e5d14b68a06631fb79f.tar.gz
android_external_ffmpeg-4c8a556a773c9706618b8e5d14b68a06631fb79f.tar.bz2
android_external_ffmpeg-4c8a556a773c9706618b8e5d14b68a06631fb79f.zip
Merge commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6'
* commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6': rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8999f5736c..b9edd46724 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -181,13 +181,16 @@ static int get_sockaddr(const char *buf, struct sockaddr_storage *sock)
#if CONFIG_RTPDEC
static void init_rtp_handler(RTPDynamicProtocolHandler *handler,
- RTSPStream *rtsp_st, AVCodecContext *codec)
+ RTSPStream *rtsp_st, AVStream *st)
{
+ AVCodecContext *codec = st ? st->codec : NULL;
if (!handler)
return;
if (codec)
codec->codec_id = handler->codec_id;
rtsp_st->dynamic_handler = handler;
+ if (st)
+ st->need_parsing = handler->need_parsing;
if (handler->alloc) {
rtsp_st->dynamic_protocol_context = handler->alloc();
if (!rtsp_st->dynamic_protocol_context)
@@ -220,7 +223,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
if (codec->codec_id == AV_CODEC_ID_NONE) {
RTPDynamicProtocolHandler *handler =
ff_rtp_handler_find_by_name(buf, codec->codec_type);
- init_rtp_handler(handler, rtsp_st, codec);
+ init_rtp_handler(handler, rtsp_st, st);
/* If no dynamic handler was found, check with the list of standard
* allocated types, if such a stream for some reason happens to
* use a private payload type. This isn't handled in rtpdec.c, since
@@ -472,7 +475,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
/* Even static payload types may need a custom depacketizer */
handler = ff_rtp_handler_find_by_id(
rtsp_st->sdp_payload_type, st->codec->codec_type);
- init_rtp_handler(handler, rtsp_st, st->codec);
+ init_rtp_handler(handler, rtsp_st, st);
if (handler && handler->init)
handler->init(s, st->index,
rtsp_st->dynamic_protocol_context);