> try to decode mpeg4 rtsp stream from ip cams in different threads
> 
> Log about cam connection
> 
> [Send] DESCRIBE rtsp://192.168.24.240:* RTSP/1.0
> User-Agent: Knight/1
> CSeq: 1
> 
> [Resive] RTSP/1.0 200 OK
> CSeq: 1
> Date: Thu, Jan 01 2004 23:56:15 GMT
> Content-Base: rtsp://192.168.24.240:554/
> Content-Type: application/sdp
> Content-Length: 421
> 
> v=0
> o=- 107300137500280000 1 IN IP4 0.0.0.0
> s=Session streamed by RTP/RTSP server
> i=ACTi.COM Streaming Media v
> t=0 0
> a=tool:ACTi.COM Streaming Media v2006.10.22
> a=type:broadcast
> a=control:*
> a=range:ntp=0-
> m=video 0 RTP/AVP 96
> c=IN IP4 0.0.0.0
> a=rtpmap:96 MP4V-ES/90000
> a=fmtp:96
> profile-level-id=245;config=000001B003000001B50900000100000001200086C40067445A1120518F000001B3001007000001B6
> a=control:track1
> 
> [Send] SETUP rtsp://192.168.24.240:*/track1 RTSP/1.0
> Transport: RTP/AVP;unicast;client_port=40364-40365
> User-Agent: Knight/1
> CSeq: 1
> 
> [Resive] RTSP/1.0 200 OK
> CSeq: 1
> Date: Thu, Jan 01 2004 23:56:16 GMT
> Transport:
> RTP/AVP;unicast;destination=192.168.21.112;client_port=40364-40365;server_port=2848-2849
> Session: 202
> 
> [Send] PLAY rtsp://192.168.24.240:* RTSP/1.0
> Session: 202
> Range: npt=0.000-
> User-Agent: Knight/1
> CSeq: 1
> 
> [Resive] RTSP/1.0 200 OK
> CSeq: 1
> Date: Thu, Jan 01 2004 23:56:16 GMT
> Range: npt=0.000-
> Session: 202
> RTP-Info: url=rtsp://192.168.24.240:554/track1;seq=5181
> 
> and i give you 2 blocks from cam (for debug i always put last 50 udp packets 
> from cam and wait for crash(it can crash anytime)). So with 2 last packets i 
> can always get error
> 
> frames_63.frm.1 119 Kb http://depositfiles.com/files/ucjiwwm11
> frames_63.frm 119 Kb http://depositfiles.com/files/ffpr7x6f6
>
> Steps to get sigsegv:
> 1.put "frames_63.frm.1" in frame(QByteArray)
>   AVPacket *avpkt=new AVPacket;
>   avpkt->size=frame.count();
>   avpkt->data=(uint8_t*)frame.data();
>   int len =avcodec_decode_video2(codecContext,picture,&got_picture,avpkt);
>   here i get len<0 (Error while decoding frame) and i decide drop frame.So
> frames_63.frm.1 lost.
> 2.put "frames_63.frm" in frame(QByteArray)
>   AVPacket *avpkt=new AVPacket;
>   avpkt->size=frame.count();
>   avpkt->data=(uint8_t*)frame.data();
>   int len =avcodec_decode_video2(codecContext,picture,&got_picture,avpkt);
>   and i crash on avcodec_decode_video2.
> 3.If you try to decode only frames_63.frm whithout frames_63.frm.1 than you 
> have
> no crash
> 
> Program terminated with signal 11, Segmentation fault.
> #0  0x083d76bd in put_pixels8_y2_mmx2 (block=0x8fe4d78 '\200' <repeats 200
> times>..., 
>     pixels=0x902bec8 <Address 0x902bec8 out of bounds>, line_size=3096, h=8) 
> at
> libavcodec/x86/dsputil_mmx_avg_template.c:634
> 634         __asm__ volatile(
> (gdb) bt
> #0  0x083d76bd in put_pixels8_y2_mmx2 (block=0x8fe4d78 '\200' <repeats 200
> times>..., 
>     pixels=0x902bec8 <Address 0x902bec8 out of bounds>, line_size=3096, h=8) 
> at
> libavcodec/x86/dsputil_mmx_avg_template.c:634
> #1  0x082cc293 in MPV_motion (s=0xadd2cff0, dest_y=0xa9b6e4d0 "", 
> dest_cb=<value
> optimized out>, dest_cr=<value optimized out>, dir=0, 
>     ref_picture=<value optimized out>, pix_op=0xadd2dcf4, qpix_op=0xadd2de54) 
> at
> libavcodec/mpegvideo_common.h:359
> #2  0x082d4b39 in MPV_decode_mb (s=0xadd2cff0, block=0x8e198f0) at
> libavcodec/mpegvideo.c:1932
> #3  0x08206414 in decode_slice (s=0xadd2cff0) at libavcodec/h263dec.c:251
> #4  0x0820764c in ff_h263_decode_frame (avctx=0xadd2cc20, data=0x8da3290,
> data_size=0xaa808354, avpkt=0x8d78e20)
>     at libavcodec/h263dec.c:646
> #5  0x08381e4b in avcodec_decode_video2 (avctx=0xadd2cc20, picture=0x8da3290,
> got_picture_ptr=0xaa808354, avpkt=0x8d78e20)
>     at libavcodec/utils.c:611
> #6  0x080959fc in DecoderThread::run (this=0x8c94ed8) at decoderthread.cpp:114
> #7  0xb6f782be in QThreadPrivate::start (arg=0x8c94ed8) at
> thread/qthread_unix.cpp:189
> #8  0xb6e58192 in start_thread () from /lib/i686/libpthread.so.0
> #9  0xb6cd090e in clone () from /lib/i686/libc.so.6
> Current language:  auto; currently c
> (gdb)
> 
> then i recompile ffmpeg with --disable-mmx
> 
> error still work but without "mmx"
> 
> Program terminated with signal 11, Segmentation fault.
> #0  0x0819d758 in put_pixels16_xy2_c (block=0xafa2e5c0 '\200' <repeats 200
> times>..., 
>     pixels=0xae83225e <Address 0xae83225e out of bounds>, line_size=12384, 
> h=8)
> at libavcodec/dsputil.c:1212
> 1212    PIXOP2(put, op_put)
> 
> my system
> 2.6.22.19-fst1m71 #1 SMP Wed Mar 26 15:34:56 YEKT 2008 i686 Intel(R) Core(TM)2
> Duo CPU     E7200  @ 2.53GHz GNU/Linux
> Mandriva Linux release 2007.1 (Official) for i586
> 
> ffmpeg
> FFmpeg version SVN-r23895, Copyright (c) 2000-2010 the FFmpeg developers
>   built on Jun 30 2010 15:22:45 with gcc 4.1.2 20070302 (prerelease)
> (4.1.2-1mdv2007.1)
>   configuration: --disable-mmx
>   libavutil     50.19. 0 / 50.19. 0
>   libavcodec    52.78. 0 / 52.78. 0
>   libavformat   52.71. 0 / 52.71. 0
>   libavdevice   52. 2. 0 / 52. 2. 0
>   libavfilter    1.20. 1 /  1.20. 1
>   libswscale     0.11. 0 /  0.11. 0
> 
> gcc version 4.1.2 20070302 (prerelease) (4.1.2-1mdv2007.1)

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to