Commit f3ba91a3 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/pixdesc: dont try to use av_read_image_line() with bayer formats

It has undefined behavior ATM as its not supported.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a25585bb
...@@ -1986,9 +1986,9 @@ void ff_check_pixfmt_descriptors(void){ ...@@ -1986,9 +1986,9 @@ void ff_check_pixfmt_descriptors(void){
} else { } else {
av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1); av_assert0(8*(c->step_minus1+1) >= c->depth_minus1+1);
} }
av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);
if (!strncmp(d->name, "bayer_", 6)) if (!strncmp(d->name, "bayer_", 6))
continue; continue;
av_read_image_line(tmp, (void*)data, linesize, d, 0, 0, j, 2, 0);
av_assert0(tmp[0] == 0 && tmp[1] == 0); av_assert0(tmp[0] == 0 && tmp[1] == 0);
tmp[0] = tmp[1] = (1<<(c->depth_minus1 + 1)) - 1; tmp[0] = tmp[1] = (1<<(c->depth_minus1 + 1)) - 1;
av_write_image_line(tmp, data, linesize, d, 0, 0, j, 2); av_write_image_line(tmp, data, linesize, d, 0, 0, j, 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment