mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
rtsp: Use avcodec_descriptor_get instead of avcodec_find_decoder
This is only used for logging a human readable codec name for debugging. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
e47b8bbf0b
commit
3fdffc032e
1 changed files with 4 additions and 4 deletions
|
|
@ -242,7 +242,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
|
|||
AVCodecParameters *par = st->codecpar;
|
||||
char buf[256];
|
||||
int i;
|
||||
AVCodec *c;
|
||||
const AVCodecDescriptor *desc;
|
||||
const char *c_name;
|
||||
|
||||
/* See if we can handle this kind of payload.
|
||||
|
|
@ -268,9 +268,9 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
|
|||
par->codec_id = ff_rtp_codec_id(buf, par->codec_type);
|
||||
}
|
||||
|
||||
c = avcodec_find_decoder(par->codec_id);
|
||||
if (c && c->name)
|
||||
c_name = c->name;
|
||||
desc = avcodec_descriptor_get(par->codec_id);
|
||||
if (desc && desc->name)
|
||||
c_name = desc->name;
|
||||
else
|
||||
c_name = "(null)";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue