[svn] / branches / release-1_3-branch / xvidcore / vfw / src / codec.c Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/vfw/src/codec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1933, Thu Dec 30 22:08:02 2010 UTC revision 1945, Thu Jan 27 13:13:16 2011 UTC
# Line 19  Line 19 
19   *      along with this program; if not, write to the Free Software   *      along with this program; if not, write to the Free Software
20   *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21   *   *
22   * $Id: codec.c,v 1.30.2.1 2010-12-30 22:07:43 Isibaar Exp $   * $Id: codec.c,v 1.30.2.2 2011-01-27 13:13:16 Isibaar Exp $
23   *   *
24   *************************************************************************/   *************************************************************************/
25    
# Line 919  Line 919 
919  {  {
920          BITMAPINFOHEADER * inhdr = &lpbiInput->bmiHeader;          BITMAPINFOHEADER * inhdr = &lpbiInput->bmiHeader;
921          BITMAPINFOHEADER * outhdr = &lpbiOutput->bmiHeader;          BITMAPINFOHEADER * outhdr = &lpbiOutput->bmiHeader;
922            int in_csp = XVID_CSP_NULL, out_csp = XVID_CSP_NULL;
923    
924          if (lpbiInput == NULL)          if (lpbiInput == NULL)
925          {          {
926                  return ICERR_ERROR;                  return ICERR_ERROR;
927          }          }
928    
929          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX && inhdr->biCompression != FOURCC_DX50 && get_colorspace(inhdr) == XVID_CSP_NULL)          if (inhdr->biCompression != FOURCC_XVID && inhdr->biCompression != FOURCC_DIVX && inhdr->biCompression != FOURCC_DX50 && (in_csp = get_colorspace(inhdr)) != XVID_CSP_YV12)
930          {          {
931                  return ICERR_BADFORMAT;                  return ICERR_BADFORMAT;
932          }          }
# Line 935  Line 936 
936                  return ICERR_OK;                  return ICERR_OK;
937          }          }
938    
939            out_csp = get_colorspace(outhdr);
940    
941          if (inhdr->biWidth != outhdr->biWidth ||          if (inhdr->biWidth != outhdr->biWidth ||
942                  inhdr->biHeight != outhdr->biHeight ||                  inhdr->biHeight != outhdr->biHeight ||
943                  get_colorspace(outhdr) == XVID_CSP_NULL)                  out_csp == XVID_CSP_NULL ||
944                    (in_csp == XVID_CSP_YV12 && in_csp != out_csp))
945          {          {
946                  return ICERR_BADFORMAT;                  return ICERR_BADFORMAT;
947          }          }

Legend:
Removed from v.1933  
changed lines
  Added in v.1945

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4