diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-01-17 20:44:33 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-01-17 20:44:33 +0100 |
commit | a1a707f7280a08d6686732e1ab911dd44663889c (patch) | |
tree | ddcfa0aba483313a242199756ade82fd4d803737 /libavformat/avformat.h | |
parent | 8fdd24455e9793d8b72c63fe06059e20ec267c9f (diff) | |
download | ffmpeg-a1a707f7280a08d6686732e1ab911dd44663889c.tar.gz |
Add a new function av_codec_get_tag2().
av_codec_get_tag() may return 0 both in case a codec_tag was
found and if no codec_tag was found.
The new function does not have this ambiguity.
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index c907d4e961..8330c6b61b 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1930,6 +1930,18 @@ enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned i */ unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id); +/** + * Get the codec tag for the given codec id. + * + * @param tags list of supported codec_id - codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param id codec id that should be searched for in the list + * @param tag A pointer to the found tag + * @return 0 if id was not found in tags, > 0 if it was found + */ +int av_codec_get_tag2(const struct AVCodecTag * const *tags, enum AVCodecID id, + unsigned int *tag); + int av_find_default_stream_index(AVFormatContext *s); /** |