Commit 4b3dc857 authored by Martin Storsjö's avatar Martin Storsjö

rtsp: Discard the dynamic handler, if it has an alloc function which failed

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent b8f02f5b
......@@ -172,8 +172,11 @@ static void init_rtp_handler(RTPDynamicProtocolHandler *handler,
return;
codec->codec_id = handler->codec_id;
rtsp_st->dynamic_handler = handler;
if (handler->alloc)
if (handler->alloc) {
rtsp_st->dynamic_protocol_context = handler->alloc();
if (!rtsp_st->dynamic_protocol_context)
rtsp_st->dynamic_handler = NULL;
}
}
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment