You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/exr: fix channel detection
This commit is contained in:
committed by
Paul B Mahol
parent
7e1e25c2dc
commit
2dd7b46132
@@ -1382,6 +1382,7 @@ static int decode_header(EXRContext *s)
|
|||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->channel_offsets[channel_index] == -1){/* channel have not been previously assign */
|
||||||
if (channel_index >= 0) {
|
if (channel_index >= 0) {
|
||||||
if (s->pixel_type != EXR_UNKNOWN &&
|
if (s->pixel_type != EXR_UNKNOWN &&
|
||||||
s->pixel_type != current_pixel_type) {
|
s->pixel_type != current_pixel_type) {
|
||||||
@@ -1392,6 +1393,7 @@ static int decode_header(EXRContext *s)
|
|||||||
s->pixel_type = current_pixel_type;
|
s->pixel_type = current_pixel_type;
|
||||||
s->channel_offsets[channel_index] = s->current_channel_offset;
|
s->channel_offsets[channel_index] = s->current_channel_offset;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
s->channels = av_realloc(s->channels,
|
s->channels = av_realloc(s->channels,
|
||||||
++s->nb_channels * sizeof(EXRChannel));
|
++s->nb_channels * sizeof(EXRChannel));
|
||||||
|
Reference in New Issue
Block a user