[mythtv-commits] Ticket #1423: assert failure in CC708Decoder::decode_cc_data / parse_cc_packet

MythTV mythtv at cvs.mythtv.org
Tue Feb 28 20:18:54 UTC 2006


#1423: assert failure in CC708Decoder::decode_cc_data / parse_cc_packet
-------------------------------------+--------------------------------------
 Reporter:  Robert Tsai <rtsai1111>  |       Owner:  ijr 
     Type:  defect                   |      Status:  new 
 Priority:  minor                    |   Milestone:      
Component:  mythtv                   |     Version:  head
 Severity:  medium                   |  
-------------------------------------+--------------------------------------
 I have a slightly damaged OTA HD recording that triggers this assert when
 running mythcommflag against it; it looks like the data contains something
 unexpected:

 {{{
 (gdb) bt
 #0  0x00002aaaae6480fd in raise () from /lib/libc.so.6
 #1  0x00002aaaae64982e in abort () from /lib/libc.so.6
 #2  0x00002aaaae6418d1 in __assert_fail () from /lib/libc.so.6
 #3  0x00002aaaab20d212 in parse_cc_packet (cb_cbs=0x69fd38, pkt=0x6e9fe0)
     at cc708decoder.cpp:584
 #4  0x00002aaaab20d35d in CC708Decoder::decode_cc_data (this=0x6e9fe0,
     cc_type=3, data1=195, data2=34) at cc708decoder.cpp:67
 #5  0x00002aaaab3044e5 in decode_cc_atsc (s=0x706ff0, buf=0x2aaab5a5f02b
 "J",
     sz=9379) at avformatdecoder.cpp:1548
 #6  0x00002aaaabddb1b2 in mpeg_decode_user_data (avctx=0xffffffffffffffff,
     buf=0x69d8 <Address 0x69d8 out of bounds>, buf_size=6) at
 mpeg12.c:2977
 #7  0x00002aaaabddb66f in mpeg_decode_frame (avctx=0x706ff0, data=Variable
 "data" is not available.
 )
     at mpeg12.c:3150
 #8  0x00002aaaabd256d7 in avcodec_decode_video (avctx=0x706ff0,
     picture=0x7fffff835c60, got_picture_ptr=0x7fffff835e1c,
     buf=0x2aaab5a5f010 "", buf_size=9406) at utils.c:948
 #9  0x00002aaaab31330b in AvFormatDecoder::GetFrame (this=0x6e8f80,
     onlyvideo=1) at avformatdecoder.cpp:2627
 #10 0x00002aaaab2d4620 in NuppelVideoPlayer::GetFrameNormal
 (this=0x69fd30,
     onlyvideo=1) at NuppelVideoPlayer.cpp:1020
 #11 0x00002aaaab2d5278 in NuppelVideoPlayer::GetFrame (this=0x69fd30,
     onlyvideo=1, unsafe=true) at NuppelVideoPlayer.cpp:1098
 #12 0x00002aaaab2e5d37 in NuppelVideoPlayer::GetRawVideoFrame
 (this=0x69fd30,
     frameNumber=-1) at NuppelVideoPlayer.cpp:4442
 #13 0x0000000000425d17 in ClassicCommDetector::go (this=0x6e7630)
     at ClassicCommDetector.cpp:350
 #14 0x000000000040a88e in DoFlagCommercials (showPercentage=false,
     fullSpeed=true, inJobQueue=true, nvp=0x69fd30, commDetectMethod=255)
     at main.cpp:448
 #15 0x000000000040c362 in FlagCommercials (chanid=@0x7fffff837eb0,
     starttime=@0x7fffff837ea0) at main.cpp:624
 #16 0x000000000040fcc2 in main (argc=3, argv=0x7fffff838308) at
 main.cpp:970

 (gdb) l parse_cc_packet
 556         }
 557     #endif
 558         parse_cc_service_stream(cc, service_num);
 559     }
 560
 561     static void parse_cc_packet(CC708Reader* cb_cbs, CaptionPacket*
 pkt)
 562     {
 563         const unsigned char* pkt_buf = pkt->data;
 564         const int pkt_size = pkt->size;
 565         int off = 1;
 566         int service_number = 0;
 567         int block_data_offset = 0;
 568         int len = ((((int)pkt_buf[0])&0x3f)*2-1)&0xff;
 569         int seq_num = (((int)pkt_buf[0])>>6)&0x3;
 570
 571     #if DEBUG_CC_RAWPACKET
 572         {
 573             int j;
 574             fprintf(stderr, "CC length(%2i) seq_num(%i) ", len,
 seq_num);
 575             for (j = 0; j < pkt_size; j++)
 576                 fprintf(stderr, "0x%x ", pkt_buf[j]);
 577             fprintf(stderr, "\n");
 578         }
 579     #else
 580         (void) seq_num;
 581     #endif
 582
 583         assert(pkt_size<127);
 584         assert(len<128);
 585

 (gdb) p /x len
 $17 = 0xff
 (gdb) p /x pkt_buf[0]
 $18 = 0x80
 (gdb) p (((int)pkt_buf[0])&0x3f)*2-1
 $19 = -1

 }}}

 I can't help debug this, but I can help test a patch, since I have a
 recording that seems to always trigger this assert failure. FWIW, this is
 last night's broadcast of Fox 24.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1423>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list