mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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;
|
||||
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>] */
|
||||
|
Loading…
Reference in New Issue
Block a user