summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-11-29 16:51:26 +0200
committerMartin Storsjö <martin@martin.st>2011-11-30 17:32:18 +0200
commit258366066479391aa998e3c8e87f70bec559db72 (patch)
tree8e65e42ec941194d39f26c3063009a21e73a1895 /libavformat/rtsp.c
parent7bb3e6259492c9923881f906be88b0c2eb5e071e (diff)
rtpdec: Add an init function that can do custom codec context initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index d0e9bbf6af..1f32050c69 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -251,6 +251,9 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
default:
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;
}
@@ -387,6 +390,9 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
handler = ff_rtp_handler_find_by_id(
rtsp_st->sdp_payload_type, st->codec->codec_type);
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 */