comparison utils.c @ 4019:a2539db62994 libavformat

Fix argument constness for the av_codec_get_id() and av_codec_get_tag() functions, making them take in input a constant array, since they're not supposed to change it. Fix some warnings.
author stefano
date Sat, 08 Nov 2008 18:37:03 +0000
parents dbc5c6bebb68
children b3d75fa26b5c
comparison
equal deleted inserted replaced
4018:0c2f650d31bb 4019:a2539db62994
1936 return tags[i].id; 1936 return tags[i].id;
1937 } 1937 }
1938 return CODEC_ID_NONE; 1938 return CODEC_ID_NONE;
1939 } 1939 }
1940 1940
1941 unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id) 1941 unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)
1942 { 1942 {
1943 int i; 1943 int i;
1944 for(i=0; tags && tags[i]; i++){ 1944 for(i=0; tags && tags[i]; i++){
1945 int tag= codec_get_tag(tags[i], id); 1945 int tag= codec_get_tag(tags[i], id);
1946 if(tag) return tag; 1946 if(tag) return tag;
1947 } 1947 }
1948 return 0; 1948 return 0;
1949 } 1949 }
1950 1950
1951 enum CodecID av_codec_get_id(const AVCodecTag *tags[4], unsigned int tag) 1951 enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
1952 { 1952 {
1953 int i; 1953 int i;
1954 for(i=0; tags && tags[i]; i++){ 1954 for(i=0; tags && tags[i]; i++){
1955 enum CodecID id= codec_get_id(tags[i], tag); 1955 enum CodecID id= codec_get_id(tags[i], tag);
1956 if(id!=CODEC_ID_NONE) return id; 1956 if(id!=CODEC_ID_NONE) return id;