[svn] / trunk / xvidcore / dshow / src / CXvidDecoder.cpp Repository:
ViewVC logotype

Diff of /trunk/xvidcore/dshow/src/CXvidDecoder.cpp

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

revision 1647, Sat Oct 8 00:58:02 2005 UTC revision 1890, Tue Aug 10 14:17:40 2010 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: CXvidDecoder.cpp,v 1.16 2005-10-08 00:58:02 suxen_drol Exp $   * $Id: CXvidDecoder.cpp,v 1.18 2010-08-10 14:17:40 Isibaar Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 419  Line 419 
419                              return E_FAIL;                              return E_FAIL;
420                      if (xvid_decore_func(0, XVID_DEC_CREATE, &m_create, 0) < 0) {                      if (xvid_decore_func(0, XVID_DEC_CREATE, &m_create, 0) < 0) {
421            DPRINTF("*** XVID_DEC_CREATE error");            DPRINTF("*** XVID_DEC_CREATE error");
422                              return S_FALSE;                              return E_FAIL;
423                      }                      }
424              }              }
425    
# Line 428  Line 428 
428        m_frame.length = mpgvi->cbSequenceHeader;        m_frame.length = mpgvi->cbSequenceHeader;
429        m_frame.output.csp = XVID_CSP_NULL;        m_frame.output.csp = XVID_CSP_NULL;
430    
431        if (xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats) >= 0) {        int ret = 0;
432          if ((ret=xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats)) >= 0) {
433          /* honour video dimensions reported in VOL header */          /* honour video dimensions reported in VOL header */
434                if (stats.type == XVID_TYPE_VOL) {                if (stats.type == XVID_TYPE_VOL) {
435            hdr->biWidth = stats.data.vol.width;            hdr->biWidth = stats.data.vol.width;
436            hdr->biHeight = stats.data.vol.height;            hdr->biHeight = stats.data.vol.height;
437          }          }
438        }        }
439          if (ret == XVID_ERR_MEMORY) return E_FAIL;
440      }      }
441    }    }
442          else          else
# Line 487  Line 488 
488                  CloseLib();                  CloseLib();
489                  return VFW_E_TYPE_NOT_ACCEPTED;                  return VFW_E_TYPE_NOT_ACCEPTED;
490          }          }
491    
492            m_create.fourcc = hdr->biCompression;
493    
494          return S_OK;          return S_OK;
495  }  }
496    
# Line 795  Line 799 
799                  if (xvid_decore_func(0, XVID_DEC_CREATE, &m_create, 0) < 0)                  if (xvid_decore_func(0, XVID_DEC_CREATE, &m_create, 0) < 0)
800                  {                  {
801              DPRINTF("*** XVID_DEC_CREATE error");              DPRINTF("*** XVID_DEC_CREATE error");
802                          return S_FALSE;                          return E_FAIL;
803                  }                  }
804          }          }
805    
# Line 863  Line 867 
867          {          {
868                  length = xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats);                  length = xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats);
869    
870                  if (length < 0)                  if (length == XVID_ERR_MEMORY)
871                            return E_FAIL;
872                    else if (length < 0)
873                  {                  {
874              DPRINTF("*** XVID_DEC_DECODE");              DPRINTF("*** XVID_DEC_DECODE");
875                          return S_FALSE;                          return S_FALSE;
# Line 907  Line 913 
913                  m_frame.general &= ~XVID_FILMEFFECT;                  m_frame.general &= ~XVID_FILMEFFECT;
914    
915                  length = xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats);                  length = xvid_decore_func(m_create.handle, XVID_DEC_DECODE, &m_frame, &stats);
916                  if (length < 0)                  if (length == XVID_ERR_MEMORY)
917                            return E_FAIL;
918                    else if (length < 0)
919                  {                  {
920              DPRINTF("*** XVID_DEC_DECODE");              DPRINTF("*** XVID_DEC_DECODE");
921                          return S_FALSE;                          return S_FALSE;

Legend:
Removed from v.1647  
changed lines
  Added in v.1890

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