[MPlayer-users] Re: Crash of mencoder in demux_ts.c line 2728

George Styles ripnetuk at gmail.com
Mon Aug 22 21:03:52 CEST 2005


A couple more points

1. The same bug exists in pre5 as well - i tested the same file on an
old install of mplayer
2. If I disable the code in question (by 'fixing' the if statement
above so its never true), the file goes through OK and encodes. Dur.
obvious, but at least it shows the file is basically OK as everything
else works.

Sorry i didnt try the CVS, but if its been in there since pre5, i
think its a 'submarine' bug :).

Finally, its happening on quite a lot of files I pull from DVB
(transport streams), so its not just the one file.

Im happy with my 'fix' for now, so unless someone on the dev team
wants me to test anything else, I will just run with what ive got
thanks

g


On 8/22/05, George Styles <ripnetuk at gmail.com> wrote:
> Hi,
> 
> Ive managed to get a reproducable crash when using mencoder to encode into divx.
> 
> The crash is a seg fault in demux_ts.c line 2728
> 
>         if(!strcmp(dvdsub_lang, ""))
>                 asgn = 1;
> 
> Ive used gdb to get the above info (using --debug-mode=3), but I could
> not get a core dump - gdb didnt write one, and trying to continue in
> gdb gave
> "Continuing.
> Cannot fetch general-purpose registers for thread -1210796352: generic error
> ".
> 
> I dont wanna go there :)
> 
> Im encoding a transport stream (with known errors in - i get dropouts
> when playing, but it does play to the end in (an old) mplayer on
> Win32.
> 
> The command is
> mencoder test.nuv -oac mp3lame -lameopts mode=2:cbr:br=96 -vf
> scale=320:240 -sws 2 -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:vbitrate=256:vpass=1 -ffourcc DIVX -o out.avi
> 
> I am trying to encode from a MPEG Transport stream (ripped using
> MythTV from a DVB-T card). I know the stream includes a video, audio
> (2 audio - anyone know why???) and a subtitle.
> 
> I think its the subtitle bit thats breaking it. The code which crashes
> looks like its trying to parse the subtitle stream, and failing, i
> assume because dvbsub_lang is a invalid pointer, or null.
> 
> Im gonna try commenting out all that code, as I dont even WANT
> subtitles in the output...
> 
> Is there any command line option to mencoder that says 'just ignore subtitles'?
> 
> Full info below (as much as I could get)
> 
> thanks
> 
> George
> 
> ----(FULL GDB INFO HERE)
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1211349312 (LWP 13819)]
> ts_parse (demuxer=0x86b4b20, es=0xbf84b0f0, packet=0x86bf594 "", probe=0)
>     at demux_ts.c:2728
> 2728
> if(!strcmp(dvdsub_lang, ""))
> 
> (gdb) bt
> #0  ts_parse (demuxer=0x86b4b20, es=0xbf84b0f0, packet=0x86bf594 "", probe=0)
>     at demux_ts.c:2728
> #1  0x0813b66b in demux_ts_fill_buffer (demuxer=0x1) at demux_ts.c:3130
> #2  0x0810ce15 in ds_fill_buffer (ds=0x86b5388) at demuxer.c:464
> #3  0x0810d00c in demux_read_data (ds=0x86b5388,
>     mem=0x860fc00 "i|UUDUUUDEEEE²Û[\221&ÒD\220", len=640) at demuxer.c:483
> #4  0x0809fe83 in mplayer_audio_read (buf=0x0, size=0) at ad_mp3lib.c:29
> #5  0x0842d0df in read_frame (fr=0x8610120) at sr1.c:60
> #6  0x0842cc43 in MP3_DecodeFrame (hova=0x0, single=-1) at sr1.c:510
> #7  0x0809ed94 in decode_audio (sh_audio=0x86c1bc8, buf=0xb76a6008 "\v",
>     minlen=70144, maxlen=192000) at dec_audio.c:398
> #8  0x08070971 in dec_audio (sh_audio=0x86c1bc8, buffer=0xbf84b470 "\v",
>     total=2304) at mencoder.c:334
> #9  0x08073084 in main (argc=0, argv=0x0) at mencoder.c:1535
> (gdb)
> 
> (gdb) disass $pc-32 $pc+32
> Dump of assembler code from 0x813a5e6 to 0x813a626:
> 0x0813a5e6 <ts_parse+11272>:    jne    0x813a5f0 <ts_parse+11282>
> 0x0813a5e8 <ts_parse+11274>:    mov    0x1c(%ebx),%ebx
> 0x0813a5eb <ts_parse+11277>:    mov    0x34(%esi),%esi
> 0x0813a5ee <ts_parse+11280>:    mov    %ebx,0xfffffe00(%ebp)
> 0x0813a5f4 <ts_parse+11286>:    mov    %esi,0xfffffdf8(%ebp)
> 0x0813a5fa <ts_parse+11292>:    jmp    0x8138bdf <ts_parse+4609>
> 0x0813a5ff <ts_parse+11297>:    mov    0x85143d8,%eax
> 0x0813a604 <ts_parse+11302>:    xor    %ecx,%ecx
> 0x0813a606 <ts_parse+11304>:    cmpb   $0x0,(%eax)
> 0x0813a609 <ts_parse+11307>:    jne    0x813a673 <ts_parse+11413>
> 0x0813a60b <ts_parse+11309>:    mov    $0x1,%ecx
> 0x0813a610 <ts_parse+11314>:    test   %ecx,%ecx
> 0x0813a612 <ts_parse+11316>:    je     0x8138bdf <ts_parse+4609>
> 0x0813a618 <ts_parse+11322>:    mov    0xfffffe00(%ebp),%ebx
> 0x0813a61e <ts_parse+11328>:    mov    0xfffffee8(%ebp),%ecx
> 0x0813a624 <ts_parse+11334>:    mov    0xffffffbc(%ebp),%esi
> End of assembler dump.
> 
> (gdb) info all-registers
> eax            0x0      0
> ecx            0x0      0
> edx            0x1      1
> ebx            0x86c0800        141297664
> esp            0xbf84ae90       0xbf84ae90
> ebp            0xbf84b0d8       0xbf84b0d8
> esi            0x2      2
> edi            0x1      1
> eip            0x813a606        0x813a606
> eflags         0x10246  66118
> cs             0x73     115
> ss             0x7b     123
> ds             0x7b     123
> es             0x7b     123
> fs             0x0      0
> gs             0x33     51
> st0            -nan(0x7f7f7f7f7f7f7f7f) (raw 0xffff7f7f7f7f7f7f7f7f)
> st1            -nan(0x7f7f7f7f7f7f7f7f) (raw 0xffff7f7f7f7f7f7f7f7f)
> st2            -nan(0x4144484845444447) (raw 0xffff4144484845444447)
> st3            68544    (raw 0x400f85e0000000000000)
> st4            177874   (raw 0x4010adb4800000000000)
> st5            2.5070002079010009765625 (raw 0x4000a072b10000000000)
> st6            5.2400000000000002131628207280300558     (raw 0x4001a7ae147ae147b
> 000)
> st7            1        (raw 0x3fff8000000000000000)
> fctrl          0x37f    895
> fstat          0x120    288
> ftag           0xffff   65535
> fiseg          0x73     115
> fioff          0xb7ec8881       -1209235327
> foseg          0x7b     123
> fooff          0xb7eeaa08       -1209095672
> fop            0x1c9    457
> xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
> 000)
> st7            1        (raw 0x3fff8000000000000000)
> fctrl          0x37f    895
> fstat          0x120    288
> ftag           0xffff   65535
> fiseg          0x73     115
> fioff          0xb7ec8881       -1209235327
> foseg          0x7b     123
> fooff          0xb7eeaa08       -1209095672
> fop            0x1c9    457
> xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
> ---Type <return> to continue, or q <return> to quit---
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> mxcsr          0x1f80   8064
> mm0            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
>     0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 = {0x7f,
>     0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
>  v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
>   v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
>   uint128 = 0x00000000000000000000000000000000}
> mxcsr          0x1f80   8064
> mm0            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
>     0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 = {0x7f,
>     0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
> ---Type <return> to continue, or q <return> to quit---
> mm1            {uint64 = 0x7f7f7f7f7f7f7f7f, v2_int32 = {0x7f7f7f7f,
>     0x7f7f7f7f}, v4_int16 = {0x7f7f, 0x7f7f, 0x7f7f, 0x7f7f}, v8_int8 = {0x7f,
>     0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}}
> mm2            {uint64 = 0x4144484845444447, v2_int32 = {0x45444447,
>     0x41444848}, v4_int16 = {0x4447, 0x4544, 0x4848, 0x4144}, v8_int8 = {0x47,
>     0x44, 0x44, 0x45, 0x48, 0x48, 0x44, 0x41}}
> mm3            {uint64 = 0x85e0000000000000, v2_int32 = {0x0, 0x85e00000},
>   v4_int16 = {0x0, 0x0, 0x0, 0x85e0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
>     0xe0, 0x85}}
> mm4            {uint64 = 0xadb4800000000000, v2_int32 = {0x0, 0xadb48000},
>   v4_int16 = {0x0, 0x0, 0x8000, 0xadb4}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0x80, 0xb4, 0xad}}
> mm5            {uint64 = 0xa072b10000000000, v2_int32 = {0x0, 0xa072b100},
>   v4_int16 = {0x0, 0x0, 0xb100, 0xa072}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0,
>     0xb1, 0x72, 0xa0}}
> mm6            {uint64 = 0xa7ae147ae147b000, v2_int32 = {0xe147b000,
>     0xa7ae147a}, v4_int16 = {0xb000, 0xe147, 0x147a, 0xa7ae}, v8_int8 = {0x0,
>     0xb0, 0x47, 0xe1, 0x7a, 0x14, 0xae, 0xa7}}
> mm7            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000},
>   v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
>     0x0, 0x80}}
> 
> (Damn these processors have a lot of regs these days)!
> 
> Couldnt get core dump because of above reason.
> 
> ----(ENVIRONMENT INFO HERE)
> 
> Running kernel 2.6.12 with FC4
> Got current CVS ffmpeg (not sure if mplayer/encoder hook into this or not)
> lame-3.96.1.
> xvidcore-1.1.0-beta2.
> MPlayer-1.0pre7
> 
> 
> ---(FILE WHICH CRASHES IT INFO)
> ffmpeg says:
> 
> Input #0, mpegts, from 'test.nuv':
>   Duration: 01:10:06.9, start: 47611.368089, bitrate: 5933 kb/s
>   Stream #0.0[0xc9]: Video: mpeg2video, yuv420p, 720x576, 25.00 fps, 8000 kb/s
>   Stream #0.1[0x191](eng): Audio: mp2, 48000 Hz, stereo, 256 kb/s
>   Stream #0.2[0x259](eng): Subtitle: dvbsub
>   Stream #0.3[0x192](eng): Audio: mp2, 48000 Hz, mono, 64 kb/s
>




More information about the MPlayer-users mailing list