aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2016-05-24 11:20:28 +0300
committerMartin Storsjö <martin@martin.st>2016-05-25 12:22:28 +0300
commit3fdffc032e8ea5676bc0c2551b900c0dc887835b (patch)
tree00339f1e58db06fda76774d9693fda864a6b03a9 /libavformat
parente47b8bbf0b54599d44b9330eb4d68cdde4f6d298 (diff)
downloadffmpeg-3fdffc032e8ea5676bc0c2551b900c0dc887835b.tar.gz
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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9e8733a108..b9416d2606 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -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)";