[haiku-bugs] Re: [Haiku] #6497: MediaConverter does not handle errors gracefully when sniffing files (easy)

  • From: "yourpalal" <trac@xxxxxxxxxxxx>
  • Date: Tue, 14 Sep 2010 18:02:02 -0000

#6497: MediaConverter does not handle errors gracefully when sniffing files 
(easy)
------------------------------------------+---------------------------------
  Reporter:  yourpalal                    |         Owner:  yourpalal     
      Type:  bug                          |        Status:  new           
  Priority:  normal                       |     Milestone:  R1            
 Component:  Applications/MediaConverter  |       Version:  R1/Development
Resolution:                               |      Keywords:                
Blocked By:                               |   Has a Patch:  0             
  Platform:  All                          |      Blocking:                
------------------------------------------+---------------------------------
Description changed by yourpalal:

Old description:

> MediaFileInfo::LoadInfo() ignores many return codes and can end up with a
> GIGO situation. Some examples are:
>
> *should check track->InitCheck() after getting the track from TrackAt()
>    (MediaFileInfo.cpp:37)
> *should check return of track->EncodedFormat()
>    (MediaFileInfo.cpp:39)
> *should check return of track->DecodedFormat()
>    (MediaFileInfo.cpp:43)
> *should check return of track->GetCodecInfo()
>    (MediaFileInfo.cpp:46)
>
> There are similar problems when sniffing audio tracks
> (MediaFileInfo.cpp:58-88)
>
> Once those are fixed, LoadInfo() should also return a status_t. And this
> should be checked in MediaFileInfoView::Update().

New description:

 MediaFileInfo::LoadInfo() ignores many return codes and can end up with a
 GIGO situation. Some examples are:

 *should check track->InitCheck() after getting the track from TrackAt()
    (MediaFileInfo.cpp:37)
 *should check return of track->EncodedFormat()
    (MediaFileInfo.cpp:39)
 *should check return of track->DecodedFormat()
    (MediaFileInfo.cpp:43)
 *should check return of track->GetCodecInfo()
    (MediaFileInfo.cpp:46)

 There are similar problems when sniffing audio tracks
 (MediaFileInfo.cpp:58-88)

 Once those are fixed, LoadInfo() should also return a status_t, which
 should be checked in MediaFileInfoView::Update().

--

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6497#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: