[mythtv-commits] Ticket #2889: Backend crashes during what appears to be preview generation

MythTV mythtv at cvs.mythtv.org
Mon Jan 8 21:29:18 UTC 2007


#2889: Backend crashes during what appears to be preview generation
--------------------------------------+-------------------------------------
 Reporter:  michael.tiller at gmail.com  |        Owner:  danielk
     Type:  defect                    |       Status:  new    
 Priority:  minor                     |    Milestone:  unknown
Component:  mythtv                    |      Version:  0.20   
 Severity:  medium                    |   Resolution:         
--------------------------------------+-------------------------------------
Comment (by michael.tiller at gmail.com):

 Here are some patches that I think are actually quite reasonable.  They do
 checks that should probably be done.  The only issue, I suspect, is how
 they respond to detecting the bad conditions.  Since I don't really
 understand completely the flow of the code and the expected return types I
 had to guess a bit.

 As a result of these diffs, my main problem appears to be gone (I noticed
 a different kind of crash, related to a free() call, with another file in
 my ring buffer but I suspect that is more of a fluke than this).  Here are
 the diffs (quite simple actually)...



 {{{
 Index: libs/libavcodec/mpeg12.c
 ===================================================================
 --- libs/libavcodec/mpeg12.c    (revision 12454)
 +++ libs/libavcodec/mpeg12.c    (working copy)
 @@ -1468,6 +1468,9 @@
          }
      }

 +    if (s->current_picture.mb_type==0) {
 +      return -1;
 +    }
      s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]=
 mb_type;

      return 0;
 Index: libs/libavutil/rational.c
 ===================================================================
 --- libs/libavutil/rational.c   (revision 12454)
 +++ libs/libavutil/rational.c   (working copy)
 @@ -36,8 +36,12 @@
      int sign= (nom<0) ^ (den<0);
      int64_t gcd= ff_gcd(ABS(nom), ABS(den));

 +    if (den==0) {
 +        return den==0;
 +    }
      nom = ABS(nom)/gcd;
      den = ABS(den)/gcd;
 +
      if(nom<=max && den<=max){
          a1= (AVRational){nom, den};
          den=0;

 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2889#comment:6>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list