Mercurial > libavcodec.hg
comparison utils.c @ 8042:e70975d5ff80 libavcodec
uses FF_ARRAY_ELEMS() where appropriate
| author | aurel |
|---|---|
| date | Tue, 21 Oct 2008 21:40:24 +0000 |
| parents | 81dba4c59fd6 |
| children | c2ab7a8958ed |
comparison
equal
deleted
inserted
replaced
| 8041:24761747ac3d | 8042:e70975d5ff80 |
|---|---|
| 1453 }; | 1453 }; |
| 1454 | 1454 |
| 1455 int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str) | 1455 int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str) |
| 1456 { | 1456 { |
| 1457 int i; | 1457 int i; |
| 1458 int n = sizeof(video_frame_size_abbrs) / sizeof(VideoFrameSizeAbbr); | 1458 int n = FF_ARRAY_ELEMS(video_frame_size_abbrs); |
| 1459 const char *p; | 1459 const char *p; |
| 1460 int frame_width = 0, frame_height = 0; | 1460 int frame_width = 0, frame_height = 0; |
| 1461 | 1461 |
| 1462 for(i=0;i<n;i++) { | 1462 for(i=0;i<n;i++) { |
| 1463 if (!strcmp(video_frame_size_abbrs[i].abbr, str)) { | 1463 if (!strcmp(video_frame_size_abbrs[i].abbr, str)) { |
| 1481 } | 1481 } |
| 1482 | 1482 |
| 1483 int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg) | 1483 int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg) |
| 1484 { | 1484 { |
| 1485 int i; | 1485 int i; |
| 1486 int n = sizeof(video_frame_rate_abbrs) / sizeof(VideoFrameRateAbbr); | 1486 int n = FF_ARRAY_ELEMS(video_frame_rate_abbrs); |
| 1487 char* cp; | 1487 char* cp; |
| 1488 | 1488 |
| 1489 /* First, we check our abbreviation table */ | 1489 /* First, we check our abbreviation table */ |
| 1490 for (i = 0; i < n; ++i) | 1490 for (i = 0; i < n; ++i) |
| 1491 if (!strcmp(video_frame_rate_abbrs[i].abbr, arg)) { | 1491 if (!strcmp(video_frame_rate_abbrs[i].abbr, arg)) { |
