[FFmpeg-devel] [PATCH]Improve av_codec_get_tag() documentation

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Dec 7 13:43:29 CET 2012


Hi!

Attached patch tries to improve the av_codec_get_tag() documentation.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7500881..3b44ee2 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1893,6 +1893,10 @@ enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned i
  *
  * @param tags list of supported codec_id-codec_tag pairs, as stored
  * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
+ *
+ * Note: The function may return 0 both in case no codec tag is found
+ * and if the found codec tag is 0, so always call av_codec_get_id(tags, 0)
+ * to know if a codec tag was found if the function returns 0.
  */
 unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);
 


More information about the ffmpeg-devel mailing list