[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 1427, Wed Apr 14 02:44:20 2004 UTC revision 1428, Wed Apr 14 03:25:41 2004 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.4 2004-04-14 02:44:20 syskin Exp $   * $Id: CXvidDecoder.cpp,v 1.5 2004-04-14 03:25:41 syskin Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 287  Line 287 
287          }          }
288  }  }
289    
290    void CXvidDecoder::CloseLib()
   
 /* destructor */  
   
 CXvidDecoder::~CXvidDecoder()  
291  {  {
292          DPRINTF("Destructor");          DPRINTF("Destructor");
293    
294          if (m_create.handle != NULL)          if (m_create.handle != NULL) {
         {  
295                  xvid_decore_func(m_create.handle, XVID_DEC_DESTROY, 0, 0);                  xvid_decore_func(m_create.handle, XVID_DEC_DESTROY, 0, 0);
296                  m_create.handle = NULL;                  m_create.handle = NULL;
297          }          }
298    
299          if (m_hdll != NULL)          if (m_hdll != NULL) {
         {  
300                  FreeLibrary(m_hdll);                  FreeLibrary(m_hdll);
301                  m_hdll = NULL;                  m_hdll = NULL;
302          }          }
303  }  }
304    
305    /* destructor */
306    
307    CXvidDecoder::~CXvidDecoder()
308    {
309            CloseLib();
310    }
311    
312    
313    
314  /* check input type */  /* check input type */
# Line 320  Line 321 
321          if (*mtIn->Type() != MEDIATYPE_Video)          if (*mtIn->Type() != MEDIATYPE_Video)
322          {          {
323                  DPRINTF("Error: Unknown Type");                  DPRINTF("Error: Unknown Type");
324                    CloseLib();
325                  return VFW_E_TYPE_NOT_ACCEPTED;                  return VFW_E_TYPE_NOT_ACCEPTED;
326          }          }
327    
# Line 345  Line 347 
347          else          else
348          {          {
349                  DPRINTF("Error: Unknown FormatType");                  DPRINTF("Error: Unknown FormatType");
350                    CloseLib();
351                  return VFW_E_TYPE_NOT_ACCEPTED;                  return VFW_E_TYPE_NOT_ACCEPTED;
352          }          }
353    
# Line 360  Line 363 
363          {          {
364    
365          case FOURCC_MP4V:          case FOURCC_MP4V:
366                  if (!(g_config.supported_4cc & SUPPORT_MP4V)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_MP4V)) {
367                            CloseLib();
368                            return VFW_E_TYPE_NOT_ACCEPTED;
369                    }
370                  break;                  break;
371          case FOURCC_DIVX :          case FOURCC_DIVX :
372                  if (!(g_config.supported_4cc & SUPPORT_DIVX)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_DIVX)) {
373                            CloseLib();
374                            return VFW_E_TYPE_NOT_ACCEPTED;
375                    }
376                  break;                  break;
377          case FOURCC_DX50 :          case FOURCC_DX50 :
378                  if (!(g_config.supported_4cc & SUPPORT_DX50)) return VFW_E_TYPE_NOT_ACCEPTED;                  if (!(g_config.supported_4cc & SUPPORT_DX50)) {
379                            CloseLib();
380                            return VFW_E_TYPE_NOT_ACCEPTED;
381                    }
382          case FOURCC_XVID :          case FOURCC_XVID :
383                  break;                  break;
384    
# Line 378  Line 390 
390                          (hdr->biCompression>>8)&0xff,                          (hdr->biCompression>>8)&0xff,
391                          (hdr->biCompression>>16)&0xff,                          (hdr->biCompression>>16)&0xff,
392                          (hdr->biCompression>>24)&0xff);                          (hdr->biCompression>>24)&0xff);
393                    CloseLib();
394                  return VFW_E_TYPE_NOT_ACCEPTED;                  return VFW_E_TYPE_NOT_ACCEPTED;
395          }          }
396          return S_OK;          return S_OK;

Legend:
Removed from v.1427  
changed lines
  Added in v.1428

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