aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-10-21 21:40:24 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-10-21 21:40:24 +0000
commit37d3e0667abd01124d783f3ca10a4aef05746a2a (patch)
tree284c171f9546a8f4dc4c12878ecb1c8333f63a76 /libavdevice/v4l2.c
parent03092e14089e086065bf05671260347ad94a6262 (diff)
downloadffmpeg-37d3e0667abd01124d783f3ca10a4aef05746a2a.tar.gz
uses FF_ARRAY_ELEMS() where appropriate
Originally committed as revision 15662 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index d8d58f06bd..dc0a22d9ba 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -221,7 +221,7 @@ static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt)
{
int i;
- for (i = 0; i < sizeof(fmt_conversion_table) / sizeof(struct fmt_map); i++) {
+ for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
if (fmt_conversion_table[i].ff_fmt == pix_fmt) {
return fmt_conversion_table[i].v4l2_fmt;
}
@@ -234,7 +234,7 @@ static enum PixelFormat fmt_v4l2ff(uint32_t pix_fmt)
{
int i;
- for (i = 0; i < sizeof(fmt_conversion_table) / sizeof(struct fmt_map); i++) {
+ for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
if (fmt_conversion_table[i].v4l2_fmt == pix_fmt) {
return fmt_conversion_table[i].ff_fmt;
}
@@ -563,7 +563,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
} else {
done = 1;
}
- if (i == sizeof(fmt_conversion_table) / sizeof(struct fmt_map)) {
+ if (i == FF_ARRAY_ELEMS(fmt_conversion_table)) {
done = 1;
}
}