rtspsrc ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource

Diego Buffa diego.buffa at gmail.com
Wed Dec 7 13:56:46 UTC 2016


Hi all,
I need to reopen this thread.
I eventually find out the problem could be related to a packet that arrive
in the between of two interleaved frame:

>From Wireshark I have:

No. Time                             SRC            DST           PROT  Len
Info

*288425* 1313.322 192.168.214.116 192.168.214.218 TCP 70 Interleaved
channel 0x00, 596 bytes[Unreassembled Packet] 0.000

*288426* 1313.323 192.168.214.116 192.168.214.218 RTSP 161 Reply: RTSP/1.0
200 OK 0.001

*288427* 1313.324 192.168.214.218 192.168.214.116 TCP 66 60654 > rsms [ACK]
Seq=27020 Ack=168154409 Win=30336 Len=0 TSval=42296588 TSecr=16694218 0.000

*288428* 1313.324 192.168.214.218 192.168.214.116 TCP 66 [TCP Dup ACK
288427#1] 60654 > rsms [ACK] Seq=27020 Ack=168154409 Win=30336 Len=0
TSval=42296588 TSecr=16694218 0.000

*288428* 1313.324 192.168.214.218 192.168.214.116 TCP 66 [TCP Dup ACK
288427#1] 60654 > rsms [ACK] Seq=27020 Ack=168154409 Win=30336 Len=0
TSval=42296588 TSecr=16694218 0.000

*288428* 1313.324 192.168.214.218 192.168.214.116 TCP 66 [TCP Dup ACK
288427#1] 60654 > rsms [ACK] Seq=27020 Ack=168154409 Win=30336 Len=0
TSval=42296588 TSecr=16694218 0.000

*288429* 1313.324 192.168.214.116 192.168.214.218 RTSP *662* Continuation
0.000

as can be seen in the sequence above the Reply packet 288426 is arrived
between packet 288425 and 288429 and has been interpreted as raw binary
data.


Here is the details of packet 288425:


0000 08 00 27 63 29 12 00 11 14 12 09 d8 08 00 45 00 ..'c)... ......E.

0010 00 38 17 d5 40 00 40 06 f4 4a c0 a8 d6 74 c0 a8 .8.. at .@. .J...t..

0020 d6 da 27 d9 ec ee b0 1d 22 84 e5 9e 34 a8 80 10 ..'..... "...4...

0030 1c 48 df 72 00 00 01 01 08 0a 00 fe bb ca 02 85 .H.r.... ........

0040 65 0b *24 00 02 54* e.$..T


As can be seen above, at 66 byte offset ( ETH=14 IP=20 TCP=34) there is the
Interleaved header saying that it will follow 0x0254=596 byte of raw data.
RawDataSize=596.

And as a matter of fact packet 288429 is 662-66=596 bytes, but in the
middle arrived packet 288426 and Gstreamer considered it as raw data
161-66=95 bytes. ReplyMessageSize = 95


If I stop the debugger on the error and I print builder->buffer  in the
build_next() function in gstrtspconnection.c I get:


(gdb) p/x builder->buffer[0]

$39 = 0xdd

(gdb) p/x builder->buffer[1]

$40 = 0xbc

(gdb) p/x builder->buffer[2]

$41 = 0x41

(gdb) p/x builder->buffer[3]

$42 = 0xfb

(gdb) p/x builder->buffer[4]

$43 = 0x8a


and if I inspect data of packet 288429:


80 e0 25 1e 19 20 fa 38 80 00 59 64 1c 41 e...%.. .8..Yd.A

0050 91 d3 b7 a5 97 92 24 27 81 49 8f 8c a3 ce 97 47 ......$' .I.....G

0060 de 19 a3 a1 43 01 7d 6c 68 f7 2e 45 ee 7b 78 c0 ....C.}l h..E.{x.

0070 eb 31 c9 2c 62 ac 3c 81 f8 64 49 7d fd f0 c6 9e .1.,b.<. .dI}....

0080 9b 67 13 64 1e f4 70 95 96 cb 08 d0 b8 8a 63 0f .g.d..p. ......c.

0090 7b b0 82 3b 6c f7 2b d3 a1 5f 1f b2 ed 2d a0 e9 {..;l.+. ._...-..

00a0 ed c4 e4 de 27 9b 28 97 25 0e 7c e3 6a 68 5b 4f ....'.(. %.|.jh[O

00b0 72 eb 09 6d cb e9 3b 5c 79 bc ef cb 58 24 2f e6 r..m..;\ y...X$/.

00c0 e2 e9 7f ff ce b9 33 db c0 56 7d 7c 78 94 c4 54 ......3. .V}|x..T

00d0 a6 32 7d b4 9e 09 bc 95 42 b2 c1 5f aa 23 db ac .2}..... B.._.#..

00e0 7b cd 83 c1 54 8a 11 0a 56 ad 67 f9 5f b4 e7 e5 {...T... V.g._...

00f0 0e 1b ba 7b b6 2c fb 63 36 73 85 23 a6 02 86 34 ...{.,.c 6s.#...4

0100 0f 97 74 74 87 39 43 d7 2e 76 3d 2d 41 a5 87 f6 ..tt.9C. .v=-A...

0110 a5 fc c4 32 79 90 61 52 f5 fd 90 af 21 11 19 1c ...2y.aR ....!...

0120 ec 3b 80 ce 39 ee d2 6a f9 0a 0c 9c f8 66 ee d4 .;..9..j .....f..

0130 5f 5e 81 79 43 54 f1 18 b0 16 49 71 90 a6 5d e8 _^.yCT.. ..Iq..].

0140 57 93 d5 ce 06 67 f9 fd c2 ea 0c 61 e3 6c fb 4d W....g.. ...a.l.M

0150 e5 ea e1 92 58 3e 7e 4b 74 6d 9c f5 49 3b 64 8e ....X>~K tm..I;d.

0160 82 7f 3b a6 7f 9e 1b c8 49 71 bf 30 12 f5 f9 67 ..;..... Iq.0...g

0170 53 74 fa 08 c6 70 2a 9f fb 1e aa a0 95 87 c9 d1 St...p*. ........

0180 79 0e 75 90 bf d5 1e d9 ec ce 68 b6 92 de d5 3a y.u..... ..h....:

0190 1b dd 67 a9 2c f8 be 23 79 5c 1d d0 d0 22 6c 0e ..g.,..# y\..."l.

01a0 52 f5 cf a7 d2 b0 74 32 8b 88 cb ce 58 52 05 b0 R.....t2 ....XR..

01b0 10 37 70 77 85 01 32 0b 00 90 64 46 5b 1a fc 3c .7pw..2. ..dF[..<

01c0 31 1f 12 98 9c 3e 3c a6 90 23 57 cc be 4b ab f0 1....><. .#W..K..

01d0 5b 2d 5e 06 5a 7d fb bb 1e 42 44 8e a9 82 4b f2 [-^.Z}.. .BD...K.

01e0 7b 74 b9 cc 5a 97 54 2a d2 ac c5 7e 52 b7 5f 65 {t..Z.T* ...~R._e

01f0 da ce 4d 2c 25 77 b9 4c e1 32 b6 7f 49 cd 48 ba ..M,%w.L .2..I.H.

0200 db b9 ed ab e5 09 04 24 9b 5c 4d eb 10 7f 20 ab .......$ .\M... .

0210 b6 ce 9c 95 59 88 82 d3 71 4b 22 40 09 f9 c5 e4 ....Y... qK"@....

0220 6a f5 12 0b 03 a7 bc 62 b1 26 4e 84 af ed e8 3a j......b .&N....:

0230 17 dd 4e 3a 9b d0 cd *dd bc 41 fb 8a* 6f 64 a8 b0 ..N:.... .A..od..

0240 f8 4f a1 c8 1c 01 33 c0 8b f1 09 6b a3 98 47 3b .O....3. ...k..G;

0250 fd d2 6d dc a7 78 ea d0 c8 3b 9e 06 26 57 75 51 ..m..x.. .;..&WuQ

0260 7a b2 20 2c 86 4e 40 aa 47 d6 ef 5e cb 50 66 0a z. ,.N at . G..^.Pf.

0270 6b 0d ee 67 74 7d 93 50 52 e3 00 7b 7b aa c3 4d k..gt}.P R..{{..M

0280 25 de 53 ff db 04 81 33 42 9d 20 37 66 12 8b 33 %.S....3 B. 7f..3

0290 41 e9 7d fb 98 1d A.}...

at offset 501 (RawDataSize - ReplyMessageSize: 596-95 ) I find the new data
that the parser function is erroneously processing.

How can I handle such a kind of error?

Eventually rtspsrc reports an GST_RTSP_EPARSE that in
gst_rtspsrc_loop_interleaved is considered as an error and stops the
pipeline.

Any idea how to synchronize the stream?

Many thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161207/28635b10/attachment.html>


More information about the gstreamer-devel mailing list