diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-18 12:29:37 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-08-20 14:20:25 +0200 |
commit | 9a151467685d286e94830fc8ad8afe4c2acd8fdd (patch) | |
tree | b7a8e33aa6af49080d241eb3bbc004d229a3d752 | |
parent | 69e2c1a95ac4dd00cb09ba3a166efc1275f5ba40 (diff) | |
download | ffmpeg-9a151467685d286e94830fc8ad8afe4c2acd8fdd.tar.gz |
ffprobe: use av_get_media_type_string() in media_type_string(), simplify
-rw-r--r-- | ffprobe.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -117,14 +117,8 @@ static char *ts_value_string (char *buf, int buf_size, int64_t ts) static const char *media_type_string(enum AVMediaType media_type) { - switch (media_type) { - case AVMEDIA_TYPE_VIDEO: return "video"; - case AVMEDIA_TYPE_AUDIO: return "audio"; - case AVMEDIA_TYPE_DATA: return "data"; - case AVMEDIA_TYPE_SUBTITLE: return "subtitle"; - case AVMEDIA_TYPE_ATTACHMENT: return "attachment"; - default: return "unknown"; - } + const char *s = av_get_media_type_string(media_type); + return s ? s : "unknown"; } static void show_packet(AVFormatContext *fmt_ctx, AVPacket *pkt) |