comparison utils.c @ 8757:d529e239a510 libavcodec

Remove 'const' qualifier from variable in av_parse_video_frame_size(). Thus only one warning is printed due to assignment instead of 2 from strtol.
author bcoudurier
date Sun, 08 Feb 2009 06:11:50 +0000
parents 153d7e5d5a5b
children f7442819cacf
comparison
equal deleted inserted replaced
8756:153d7e5d5a5b 8757:d529e239a510
1030 1030
1031 int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str) 1031 int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str)
1032 { 1032 {
1033 int i; 1033 int i;
1034 int n = FF_ARRAY_ELEMS(video_frame_size_abbrs); 1034 int n = FF_ARRAY_ELEMS(video_frame_size_abbrs);
1035 const char *p; 1035 char *p;
1036 int frame_width = 0, frame_height = 0; 1036 int frame_width = 0, frame_height = 0;
1037 1037
1038 for(i=0;i<n;i++) { 1038 for(i=0;i<n;i++) {
1039 if (!strcmp(video_frame_size_abbrs[i].abbr, str)) { 1039 if (!strcmp(video_frame_size_abbrs[i].abbr, str)) {
1040 frame_width = video_frame_size_abbrs[i].width; 1040 frame_width = video_frame_size_abbrs[i].width;
1042 break; 1042 break;
1043 } 1043 }
1044 } 1044 }
1045 if (i == n) { 1045 if (i == n) {
1046 p = str; 1046 p = str;
1047 frame_width = strtol(p, (char **)&p, 10); 1047 frame_width = strtol(p, &p, 10);
1048 if (*p) 1048 if (*p)
1049 p++; 1049 p++;
1050 frame_height = strtol(p, (char **)&p, 10); 1050 frame_height = strtol(p, &p, 10);
1051 } 1051 }
1052 if (frame_width <= 0 || frame_height <= 0) 1052 if (frame_width <= 0 || frame_height <= 0)
1053 return -1; 1053 return -1;
1054 *width_ptr = frame_width; 1054 *width_ptr = frame_width;
1055 *height_ptr = frame_height; 1055 *height_ptr = frame_height;