diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-29 22:06:44 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-09-29 22:06:44 +0000 |
commit | f34fcdc8b67fb477563a8fc4284434b707de3d3b (patch) | |
tree | 8f246db063c0170e56af3b065e2247432d2ea9b5 | |
parent | e60c906a82b8982c23d0a71ef31b2aad5626fd6e (diff) | |
download | ffmpeg-f34fcdc8b67fb477563a8fc4284434b707de3d3b.tar.gz |
Set default values for the scale context in sws_alloc_context().
Originally committed as revision 32415 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r-- | libswscale/utils.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index ad8895be3f..83883b721a 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -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 *sws_alloc_context(void) SwsContext *c= av_mallocz(sizeof(SwsContext)); c->av_class = &sws_context_class; + av_opt_set_defaults(c); return c; } @@ -1154,9 +1156,6 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, 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); |