Commit 1719c7f5 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avformat/webmdashenc: Use AVCodecDescriptors for codec names

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent cbea58b2
...@@ -61,17 +61,7 @@ typedef struct WebMDashMuxContext { ...@@ -61,17 +61,7 @@ typedef struct WebMDashMuxContext {
static const char *get_codec_name(int codec_id) static const char *get_codec_name(int codec_id)
{ {
switch (codec_id) { return avcodec_descriptor_get(codec_id)->name;
case AV_CODEC_ID_VP8:
return "vp8";
case AV_CODEC_ID_VP9:
return "vp9";
case AV_CODEC_ID_VORBIS:
return "vorbis";
case AV_CODEC_ID_OPUS:
return "opus";
}
return NULL;
} }
static double get_duration(AVFormatContext *s) static double get_duration(AVFormatContext *s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment