diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-01 21:30:36 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2009-08-01 21:30:36 +0000 |
commit | 062394e07caf07e39436ca66fd6f4ba50a05839c (patch) | |
tree | 80abb6b1d99942d11e0007cc1436954435dcd0c3 | |
parent | cbf298899d990ac3e491b4c1aab8532bc241268c (diff) | |
download | ffmpeg-062394e07caf07e39436ca66fd6f4ba50a05839c.tar.gz |
Fix regression when converting to nv12/nv21.
Patch by Guennadi Liakhovetski, g D liakhovetski A gmx D de
Originally committed as revision 29464 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
-rw-r--r-- | libswscale/swscale.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 59d4d841fe..55871c5074 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2759,7 +2759,9 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d || (isGray(dstFormat) && isGray(srcFormat)) || (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) && c->chrDstHSubSample == c->chrSrcHSubSample - && c->chrDstVSubSample == c->chrSrcVSubSample)) + && c->chrDstVSubSample == c->chrSrcVSubSample + && dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 + && srcFormat != PIX_FMT_NV12 && srcFormat != PIX_FMT_NV21)) { if (isPacked(c->srcFormat)) c->swScale= packedCopy; |