[FFmpeg-devel] [PATCH 1/2] ffserver: use avcodec_descriptor_get_by_name() to identify codec id.
Clément Bœsch
ubitux at gmail.com
Tue Nov 13 16:35:17 CET 2012
From: Clément Bœsch <clement.boesch at smartjog.com>
That way, configuration such as "AudioCodec mp3" will work.
---
ffserver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ffserver.c b/ffserver.c
index d224b41..0d2a8a7 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3937,7 +3937,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
static enum AVCodecID opt_audio_codec(const char *arg)
{
- AVCodec *p= avcodec_find_encoder_by_name(arg);
+ const AVCodecDescriptor *p = avcodec_descriptor_get_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
return AV_CODEC_ID_NONE;
@@ -3947,7 +3947,7 @@ static enum AVCodecID opt_audio_codec(const char *arg)
static enum AVCodecID opt_video_codec(const char *arg)
{
- AVCodec *p= avcodec_find_encoder_by_name(arg);
+ const AVCodecDescriptor *p = avcodec_descriptor_get_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
return AV_CODEC_ID_NONE;
--
1.7.10.4
More information about the ffmpeg-devel
mailing list