diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-10-12 15:56:34 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-10-12 15:58:37 +0000 |
commit | 82eba2266739dcd64f01ac22283c9bfa46607512 (patch) | |
tree | cb6ee9ba0d04d2240b1431dcb93b3124a1c0cc99 /libavdevice/lavfi.c | |
parent | 0d002de4a452c0b270364ac0424368d507629463 (diff) | |
download | ffmpeg-82eba2266739dcd64f01ac22283c9bfa46607512.tar.gz |
lavd: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavdevice/lavfi.c')
-rw-r--r-- | libavdevice/lavfi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 860c055a05..944794fb87 100644 --- a/libavdevice/lavfi.c +++ b/libavdevice/lavfi.c @@ -54,14 +54,17 @@ static int *create_all_formats(int n) { int i, j, *fmts, count = 0; - for (i = 0; i < n; i++) - if (!(av_pix_fmt_descriptors[i].flags & PIX_FMT_HWACCEL)) + for (i = 0; i < n; i++) { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i); + if (!(desc->flags & PIX_FMT_HWACCEL)) count++; + } if (!(fmts = av_malloc((count+1) * sizeof(int)))) return NULL; for (j = 0, i = 0; i < n; i++) { - if (!(av_pix_fmt_descriptors[i].flags & PIX_FMT_HWACCEL)) + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i); + if (!(desc->flags & PIX_FMT_HWACCEL)) fmts[j++] = i; } fmts[j] = -1; |