mirror of https://git.ffmpeg.org/ffmpeg.git
rtsp: Discard the dynamic handler, if it has an alloc function which failed
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
b8f02f5b4e
commit
4b3dc857e4
|
@ -172,8 +172,11 @@ static void init_rtp_handler(RTPDynamicProtocolHandler *handler,
|
||||||
return;
|
return;
|
||||||
codec->codec_id = handler->codec_id;
|
codec->codec_id = handler->codec_id;
|
||||||
rtsp_st->dynamic_handler = handler;
|
rtsp_st->dynamic_handler = handler;
|
||||||
if (handler->alloc)
|
if (handler->alloc) {
|
||||||
rtsp_st->dynamic_protocol_context = 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>] */
|
/* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */
|
||||||
|
|
Loading…
Reference in New Issue