comparison codec-cfg.c @ 29450:85bea9f80e86

Explain how formats must be ordered in fmt_list so the parser can handle names where one matches the beginning of another.
author reimar
date Tue, 11 Aug 2009 18:21:31 +0000
parents 290afe64ba96
children 28e5ee835b6b
comparison
equal deleted inserted replaced
29449:290afe64ba96 29450:85bea9f80e86
140 140
141 static const struct { 141 static const struct {
142 const char *name; 142 const char *name;
143 const unsigned int num; 143 const unsigned int num;
144 } fmt_table[] = { 144 } fmt_table[] = {
145 // note: due to parser deficiencies/simplicity, if one format
146 // name matches the beginning of another, the longer one _must_
147 // come first in this list.
145 {"YV12", IMGFMT_YV12}, 148 {"YV12", IMGFMT_YV12},
146 {"I420", IMGFMT_I420}, 149 {"I420", IMGFMT_I420},
147 {"IYUV", IMGFMT_IYUV}, 150 {"IYUV", IMGFMT_IYUV},
148 {"NV12", IMGFMT_NV12}, 151 {"NV12", IMGFMT_NV12},
149 {"NV21", IMGFMT_NV21}, 152 {"NV21", IMGFMT_NV21},