Mercurial > mplayer.hg
changeset 32329:597a570963fa
Set default values for the scale context in sws_alloc_context().
author | stefano |
---|---|
date | Wed, 29 Sep 2010 22:06:44 +0000 |
parents | d13a73c5455c |
children | acbe908638b2 |
files | libswscale/utils.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/utils.c Wed Sep 29 22:06:40 2010 +0000 +++ b/libswscale/utils.c Wed Sep 29 22:06:44 2010 +0000 @@ -43,6 +43,7 @@ #include "libavutil/x86_cpu.h" #include "libavutil/avutil.h" #include "libavutil/bswap.h" +#include "libavutil/opt.h" #include "libavutil/pixdesc.h" unsigned swscale_version(void) @@ -746,6 +747,7 @@ SwsContext *c= av_mallocz(sizeof(SwsContext)); c->av_class = &sws_context_class; + av_opt_set_defaults(c); return c; } @@ -1154,9 +1156,6 @@ if (param) { c->param[0] = param[0]; c->param[1] = param[1]; - } else { - c->param[0] = - c->param[1] = SWS_PARAM_DEFAULT; } sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT] /* FIXME*/, c->dstRange, 0, 1<<16, 1<<16);