MPEG-TS, Rust, and C strings – the ongoing saga

Russel Winder russel at winder.org.uk
Thu Jul 18 10:41:35 UTC 2019


Hi,

Having got over the stupid stuff, I think I am now onto the more serious
stuff. 

Using Freeview input (BBC News) to my Rust MPEG-TS wrapper, I am finding:

1. There are a lot of ContentIdentifier descriptors, but there seems no way of
processing them in the C API or the Rust sys level wrapper.

2. There are a lot of PrivateDataSpecifier descriptors, but there seems no way
of processing them in the C API or the Rust sys level wrapper.

3. I am getting a SIGSEGV when processing ShortEvent descriptors early on. In
each run I process some ShortEvent descriptors entirely fine. However very
quickly there is a ShortEvent descriptor that delivers back a string that is
seemingly not a C string.

1. and 2. maybe that I haven't studied enough, but the ETSI document says
nothing about a ContentIdentifier descriptor as far as I can tell, and there
is nothing in the MPEG-TS at C or Rust sys level. Whilst the ETSI document
talks of a PrivateDataSpecifier descriptor and gives a formatting, this
doesn't seem to be supported at the MPEG-TS library C and Rust sys level.

3. is about having called:

gst_mpegts_sys::gst_mpegts_descriptor_parse_dvb_short_event(descriptor, &mut language_code, &mut name, &mut text) != 0 {

and language_code being a pointer to a C string but name not being. In earlier
calls everything worked so I believe it is not my code (but as ever I am happy
to be proved wrong). It appears that Freeview is delivering a ShortEvent
descriptor such that this C code in MPEG-TS is not delivering back a C string
for name, but instead doing a SIGSEGV in the sys::strlen called at line 965 of
c_str.rs.

I shall extract the data of the descriptor to create a test case as soon as I
can.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190718/bd400d42/attachment.sig>


More information about the gstreamer-devel mailing list