mirror of https://git.ffmpeg.org/ffmpeg.git
swscale/utils: Set all threads to the same colorspace even on failure
Fixes: ./ffplay dav.y4m -vf "scale=hd1080:threads=4" Found-by: Paul Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9df3f147f5
commit
c7699f95bb
|
@ -874,15 +874,16 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
|
||||||
int need_reinit = 0;
|
int need_reinit = 0;
|
||||||
|
|
||||||
if (c->nb_slice_ctx) {
|
if (c->nb_slice_ctx) {
|
||||||
|
int parent_ret = 0;
|
||||||
for (int i = 0; i < c->nb_slice_ctx; i++) {
|
for (int i = 0; i < c->nb_slice_ctx; i++) {
|
||||||
int ret = sws_setColorspaceDetails(c->slice_ctx[i], inv_table,
|
int ret = sws_setColorspaceDetails(c->slice_ctx[i], inv_table,
|
||||||
srcRange, table, dstRange,
|
srcRange, table, dstRange,
|
||||||
brightness, contrast, saturation);
|
brightness, contrast, saturation);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
parent_ret = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return parent_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_formats(c);
|
handle_formats(c);
|
||||||
|
|
Loading…
Reference in New Issue