diff options
author | Pedro Arthur <bygrandao@gmail.com> | 2015-09-04 18:11:21 -0300 |
---|---|---|
committer | Pedro Arthur <bygrandao@gmail.com> | 2015-09-04 19:00:20 -0300 |
commit | 3059562aa19a576bdf900a4875c1aa69ef69c86e (patch) | |
tree | 93638cfb4d090e600626060865a89b2e25b75ddb /libswscale/utils.c | |
parent | f67aff3ad7168b0721e7e5ba05858d885966534a (diff) | |
download | ffmpeg-3059562aa19a576bdf900a4875c1aa69ef69c86e.tar.gz |
swscale: re-enable gamma
+added gamma conversion to refactored code
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 4664de42e3..0c4b4d7977 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1419,6 +1419,15 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, if (!c2->gamma || !c2->inv_gamma) return AVERROR(ENOMEM); + // is_internal_flag is set after creating the context + // to properly create the gamma convert FilterDescriptor + // we have to re-initialize it + ff_free_filters(c2); + if (ff_init_filters(c2) < 0) { + sws_freeContext(c2); + return -1; + } + c->cascaded_context[2] = NULL; if (dstFormat != tmpFmt) { ret = av_image_alloc(c->cascaded1_tmp, c->cascaded1_tmpStride, |