Vincent Penquerc'h [Mon, 21 Apr 2014 09:36:55 +0000 (10:36 +0100)]
vc1parse: guard against dividing by zero
If framerate is unknown, we write the maximum framerate
allowed for this profile/level:
https://tools.ietf.org/html/draft-ietf-avt-rtp-vc1-06#section-6.1
http://wiki.multimedia.cx/index.php?title=VC-1#Setup_Data_.2F_Sequence_Layer
Coverity 1139694
Vincent Penquerc'h [Mon, 21 Apr 2014 09:07:06 +0000 (10:07 +0100)]
mxfmux: guard against dividing by 0
Use a placeholder value in that case, it's better than crashing.
Coverity 1139697
Vincent Penquerc'h [Mon, 21 Apr 2014 08:51:19 +0000 (09:51 +0100)]
gl: a couple spelling/grammar fixes
Vincent Penquerc'h [Mon, 21 Apr 2014 08:50:19 +0000 (09:50 +0100)]
gl: guard against using a NULL window pointer
Coverity 1195145
Vincent Penquerc'h [Mon, 21 Apr 2014 08:47:08 +0000 (09:47 +0100)]
gl: prevent division by 0 on unsupported texture type
Coverity 1199697
Jan Schmidt [Mon, 21 Apr 2014 12:01:47 +0000 (22:01 +1000)]
glcolorconvert: Fix bt709 conversion matrices.
Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
Vincent Penquerc'h [Thu, 17 Apr 2014 08:58:47 +0000 (09:58 +0100)]
dvbbasebin: fix test for proper use count balancing
usecount is unsigned, so too many "unuse" will wrap the counter
around and the >= 0 check will always be fine.
It would be much simpler to just make the counter signed, but
moving the checks where the decrements happen allow a mistake
to be detected earlier, and thus easier to debug.
Coverity 1139791
Vincent Penquerc'h [Thu, 17 Apr 2014 08:35:37 +0000 (09:35 +0100)]
mxfdemux: guard against NULL non source components
This component is dereferenced, and later code checking for
NULL in particular cases implies it can be NULL. This likely
does not fix the coverity warning as it was seeing another
path setting component to NULL explicitely, but this was
spotted by looking at:
Coverity 1139736
Which is actually OK from what I can see since the actual
dereference of the explicit NULL pointer will not happen
if the condition that led to the NULL pointer assignment
is met, since the assignment and defeference have mutually
exclusive tests.
Vincent Penquerc'h [Thu, 17 Apr 2014 08:26:20 +0000 (09:26 +0100)]
rawparse: catch errors in caps manipulation
Coverity 1139622
Andoni Morales Alastruey [Fri, 18 Apr 2014 18:12:37 +0000 (20:12 +0200)]
vtenc: fix complier error using fixed lenght arrays
Gwenole Beauchesne [Fri, 18 Apr 2014 16:12:36 +0000 (18:12 +0200)]
ivfparse: detect and propagate resolution changes.
Detect resolution changes on key frames, and propagate the resulting
caps to the src pad. Only the uncompressed data chunk is decoded, so
avoid using the new VP8 bitstream parsing library for now.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Gwenole Beauchesne [Fri, 18 Apr 2014 15:34:08 +0000 (17:34 +0200)]
ivfparse: avoid possible division-by-zero when calculating PTS.
Avoid possible division-by-zero while deriving the presentation timestamp
of the buffer. The base class will take care of any interpolation needs.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Halley Zhao [Thu, 24 Oct 2013 23:38:53 +0000 (07:38 +0800)]
ivfparse: enable build.
Drop `ivfparse' element from the non-ported set of plugins in configure.
Gwenole Beauchesne [Tue, 4 Mar 2014 14:46:58 +0000 (15:46 +0100)]
ivfparse: port to baseparse.
https://bugzilla.gnome.org/show_bug.cgi?id=710855
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Zhao, Halley [Fri, 24 Jan 2014 00:37:16 +0000 (08:37 +0800)]
tests: add standalone program for VP8 parser.
Add standalone test application that demonstrates how to use the new
VP8 bitstream parsing library, while also allowing simple debugging/
tracing of IVF files.
[clean-ups, updated to new parser API]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Zhao, Halley [Tue, 7 Jan 2014 18:49:00 +0000 (02:49 +0800)]
tests: add test for VP8 bitstream parsing library.
[updated to new parser API]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Sebastian Dröge [Wed, 9 Apr 2014 07:22:02 +0000 (09:22 +0200)]
codecparsers: vp8: rename dboolhuff symbols.
Rename VP8 dboolhuff symbols so that to avoid clashes with libvpx when
static linking.
Gwenole Beauchesne [Tue, 8 Apr 2014 08:30:09 +0000 (10:30 +0200)]
codecparsers: vp8: add GStreamer native utilities.
Import libvpx 1.3.0 range decoder files (dboolhuff.[ch]) to implement
the VP8 utilities native interface. Likewise, copy and use the default
libvpx generated entropy probabilities tables.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Zhao, Halley [Tue, 7 Jan 2014 18:49:00 +0000 (02:49 +0800)]
codecparsers: add VP8 bitstream parser.
https://bugzilla.gnome.org/show_bug.cgi?id=722760
[refactored, among other fixes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Edward Hervey [Fri, 18 Apr 2014 14:23:43 +0000 (16:23 +0200)]
mpegtspacketizer: Improve ts_to_offset code
* Search in current pending values first. For CBR streams we can very
easily end up having just one initial observations and then nothing
else (since the bitrate doesn't change).
* Use one group whether we are in that group *OR* if there is only
one group.
* If the group to use isn't closed (points are being accumulated in the
PCROffsetCurrent), use the latest data available for calculation
* If in the unlikelyness that all of this *still* didn't produce more
than one data point, just return the initial offset
Edward Hervey [Fri, 18 Apr 2014 14:20:31 +0000 (16:20 +0200)]
tsdemux: Fix scaling macros
While the calculation done in these macros will work with 64bit
integers, they will fail if working with 32bit integers.
Force the scaling up to solve that.
This amazingly didn't introduce major issues up to now, but resulted
in bogus values in debug logs.
Edward Hervey [Fri, 18 Apr 2014 14:18:01 +0000 (16:18 +0200)]
mpegtsbase: Don't hard-flush the packetizer on discont buffers
Doing a hard flush on the packetizer will drop all observations, which
will eventually break push-based seeking (with BYTES segment) since
we won't know where to seek to anymore (new data would always be
considered as the beginning of the stream).
Edward Hervey [Wed, 16 Apr 2014 14:25:29 +0000 (16:25 +0200)]
mxfdemux: Fix copy/paste error
We want to check whether the rate is different. We check changes in
numerator *and* denominator.
CID #1139631
CID #1139642
Edward Hervey [Wed, 16 Apr 2014 14:19:47 +0000 (16:19 +0200)]
mxf: Handle fraction parsing failure
And properly cleanup/reset the segment before returning on errors
CID #206012
Edward Hervey [Wed, 16 Apr 2014 14:12:02 +0000 (16:12 +0200)]
mxf: Remove useless check
a guint will always smaller or equal to the maximum value it can
contain
CID #206049
Vincent Penquerc'h [Wed, 9 Apr 2014 11:27:16 +0000 (12:27 +0100)]
mxf: avoid dereferencing NULL mapping data pointer
Also unref buffers on error, as it seems to be done in one, but
not all, error paths.
The NULL pointer part is Coverity 206112
https://bugzilla.gnome.org/show_bug.cgi?id=727889
Edward Hervey [Wed, 16 Apr 2014 14:07:17 +0000 (16:07 +0200)]
dvb: Fix if() check
introduced by my previous commit :(
Edward Hervey [Wed, 16 Apr 2014 13:43:06 +0000 (15:43 +0200)]
configure: Detect EGL header presence
Fixes the build for Android, and I suspect for other systems too...
Edward Hervey [Wed, 16 Apr 2014 13:37:57 +0000 (15:37 +0200)]
dvb/camsession: Don't do operations on unexisting sessions
CID #206114
Edward Hervey [Wed, 16 Apr 2014 13:32:32 +0000 (15:32 +0200)]
dvb: Handle socket() failure
CID #206178
Edward Hervey [Wed, 16 Apr 2014 13:23:57 +0000 (15:23 +0200)]
dvbsrc: Handle failure to get statistics from the device
Check the ioctl return value and don't output bogus values.
CID #206016
Edward Hervey [Wed, 16 Apr 2014 13:18:44 +0000 (15:18 +0200)]
dvbsrc: Don't close a fd that wasn't open
We are handling the failure cases in this block where the open failed
CID #206179
Edward Hervey [Wed, 16 Apr 2014 13:17:03 +0000 (15:17 +0200)]
dvbsrc: Don't try to access NULL string
And refactor the pid setting code to be in its own function for clarity
CID #206374
Stefan Ringel [Thu, 10 Apr 2014 14:04:21 +0000 (16:04 +0200)]
mpegts: add dvb ca identifier descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
Stefan Ringel [Thu, 10 Apr 2014 14:03:07 +0000 (16:03 +0200)]
mpegts: add scrambling descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
Stefan Ringel [Thu, 10 Apr 2014 14:02:09 +0000 (16:02 +0200)]
mpegts: add frequency list descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
Stefan Ringel [Thu, 10 Apr 2014 14:00:50 +0000 (16:00 +0200)]
mpegts: add data broadcast id descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
Stefan Ringel [Thu, 10 Apr 2014 13:59:50 +0000 (15:59 +0200)]
mpegts: add private data specifier descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
Sebastian Dröge [Wed, 16 Apr 2014 07:20:37 +0000 (09:20 +0200)]
dvb: Minor code style fix
Stefan Ringel [Thu, 10 Apr 2014 13:58:55 +0000 (15:58 +0200)]
mpegts: add parential rating descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
Stefan Ringel [Thu, 10 Apr 2014 13:58:04 +0000 (15:58 +0200)]
mpegts: add linkage descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
Tim-Philipp Müller [Tue, 15 Apr 2014 23:25:51 +0000 (00:25 +0100)]
mpegts: for loop initial declarations are only allowed in C99 mode
Fixes compiler warnings.
Sebastian Dröge [Tue, 15 Apr 2014 18:47:55 +0000 (20:47 +0200)]
egl: Add libgstegl and eglgles plugin to the CRUFT directories
Julien Isorce [Tue, 15 Apr 2014 16:58:34 +0000 (17:58 +0100)]
egl/eglglessink: remove since EGLImage and iOS support have been added in glimagesink
https://bugzilla.gnome.org/show_bug.cgi?id=703343
Julien Isorce [Mon, 24 Mar 2014 12:08:43 +0000 (12:08 +0000)]
gl: allow to include GLES/gl.h
https://bugzilla.gnome.org/show_bug.cgi?id=703343
Edward Hervey [Mon, 14 Apr 2014 05:56:16 +0000 (07:56 +0200)]
wayland: Remove dead assignment
We set it just after variable declaration
CID #1197709
Sebastian Dröge [Sun, 13 Apr 2014 17:20:32 +0000 (19:20 +0200)]
gl/eagl: Fix compilation
Sebastian Dröge [Sun, 13 Apr 2014 14:53:58 +0000 (16:53 +0200)]
gl/eagl: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
Sebastian Dröge [Sun, 13 Apr 2014 14:46:11 +0000 (16:46 +0200)]
gl/eagl: Remove spurious private struct pointer
Sebastian Dröge [Sun, 13 Apr 2014 14:40:58 +0000 (16:40 +0200)]
gl/android: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
Matthew Waters [Sun, 13 Apr 2014 12:16:45 +0000 (22:16 +1000)]
glimagesink: remove unused texture
Matthew Waters [Sun, 13 Apr 2014 12:14:52 +0000 (22:14 +1000)]
glimagesink: move upload into _prepare()
Matthew Waters [Sun, 13 Apr 2014 03:49:22 +0000 (13:49 +1000)]
gl/context: output available extensions
Matthew Waters [Sun, 13 Apr 2014 03:39:14 +0000 (13:39 +1000)]
gl/context: provide get_gl_version
Julien Isorce [Sat, 12 Apr 2014 23:21:00 +0000 (00:21 +0100)]
gl/color: restore viewport dimensions when fbo done
Regression introduced by
95abfda1399bcddbee345d4542e857d743965477.
It caused to display the wrong frame size when resizing the window.
Sebastian Dröge [Sat, 12 Apr 2014 20:45:30 +0000 (22:45 +0200)]
gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions
Sebastian Dröge [Sat, 12 Apr 2014 20:15:35 +0000 (22:15 +0200)]
gl: Set glimagesink rank to SECONDARY
This is a full-featured video sink now and especially should be
used instead of osxvideosink on OSX if available.
Sebastian Dröge [Sat, 12 Apr 2014 19:43:50 +0000 (21:43 +0200)]
gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
Julien Isorce [Sat, 12 Apr 2014 16:33:44 +0000 (17:33 +0100)]
gl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant
Backends that use g_main_context_invoke are re-entrant.
Il allows to call two nested gst_gl_context_thread_add.
ex: init_upload / init_colorconvert
Sebastian Dröge [Sat, 12 Apr 2014 15:01:09 +0000 (17:01 +0200)]
glimagesink: First handle GL window setup, then create the context and its thread
Julien Isorce [Sat, 12 Apr 2014 14:51:47 +0000 (15:51 +0100)]
gl/cocoa: fix NSAutoreleasePool initialization
Julien Isorce [Sat, 12 Apr 2014 11:42:40 +0000 (12:42 +0100)]
gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.
Fix a regression introduces by
82b7c915bb02a9790d256d599452e5a54afda633
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.
Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.
From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.
We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.
The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.
Julien Isorce [Sat, 12 Apr 2014 13:40:40 +0000 (14:40 +0100)]
gl/color: fix warning type qualifiers ignored
i686-apple-darwin11-llvm-gcc-4.2
"warning: type qualifiers ignored on function return type"
Matthew Waters [Sat, 12 Apr 2014 08:24:43 +0000 (18:24 +1000)]
gl/color: remove if statement with no effect
Coverity 1199698
Matthew Waters [Sat, 12 Apr 2014 08:16:29 +0000 (18:16 +1000)]
gl/color: pass large value by reference
Coverity 1199700
Aleix Conchillo Flaqué [Wed, 2 Apr 2014 19:59:58 +0000 (12:59 -0700)]
srtpdec: fix assertion checking ssrc from rtcp packets
rtcp_buffer_get_ssrc is called even with RTP buffers. this means we
might end up with an exception and not find any valid RTCP packet type
and thus hit GST_RTCP_TYPE_INVALID. we now take care of this.
https://bugzilla.gnome.org/show_bug.cgi?id=727512
Andoni Morales Alastruey [Fri, 11 Apr 2014 10:29:17 +0000 (12:29 +0200)]
jp2kdecimator: fix maybe-uninitialized compiler error
Edward Hervey [Fri, 11 Apr 2014 09:34:26 +0000 (11:34 +0200)]
mpegtsmux: Remove unneeded unref
packet_buffer has already been cleared in all code paths leading
to this point.
CID #1199696
Edward Hervey [Fri, 11 Apr 2014 06:39:29 +0000 (08:39 +0200)]
dvbsrc: Handle symbols added in minor version 7 and 8
Some symbols were re-defined in minor v8 (GO TEAM BACKWARDS COMPATIBLE!)
Some symbols were added in minor v7
https://bugzilla.gnome.org/show_bug.cgi?id=727977
Matthew Waters [Fri, 11 Apr 2014 07:24:39 +0000 (17:24 +1000)]
gl/mem: cache the stride/unpack length for upload
Matthew Waters [Fri, 11 Apr 2014 07:23:32 +0000 (17:23 +1000)]
gl/color: explicitly map the buffers we are copying into
Otherwise it may not be downloaded at all.
Edward Hervey [Fri, 11 Apr 2014 06:16:01 +0000 (08:16 +0200)]
dvbsrc: Add comment with all DVB API v5 minor changes
There wasn't a definite list anyway, so I just dove in the kernel
and extract all that information.
Matthew Waters [Fri, 11 Apr 2014 06:09:09 +0000 (16:09 +1000)]
gl/color: cache the temporary textures
Matthew Waters [Fri, 11 Apr 2014 01:04:43 +0000 (11:04 +1000)]
gl/mem: provide defines for tokens not defined in GLES2/ancient platforms
Matthew Waters [Fri, 11 Apr 2014 01:03:19 +0000 (11:03 +1000)]
gl: fixup incorrect number of arguments
Matthew Waters [Fri, 11 Apr 2014 00:55:21 +0000 (10:55 +1000)]
gl: fix incorrect usage of g_return_if_fail
Matthew Waters [Wed, 2 Apr 2014 06:43:52 +0000 (17:43 +1100)]
gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.
Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).
Should not lose any features/video formats.
Matthew Waters [Tue, 1 Apr 2014 04:10:05 +0000 (15:10 +1100)]
gl/eglimage: #if 0 unused code
Matthew Waters [Tue, 1 Apr 2014 02:30:51 +0000 (13:30 +1100)]
gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
Vincent Penquerc'h [Thu, 10 Apr 2014 16:55:21 +0000 (17:55 +0100)]
faac: fix faac API error checking
Coverity 1139790
Vincent Penquerc'h [Thu, 10 Apr 2014 16:52:02 +0000 (17:52 +0100)]
dashdemux: do not ignore failure to register typefinder
Coverity 1139629
Vincent Penquerc'h [Thu, 10 Apr 2014 16:48:03 +0000 (17:48 +0100)]
dashdemux: fix time leak
Coverity 1147016
Vincent Penquerc'h [Thu, 10 Apr 2014 16:44:14 +0000 (17:44 +0100)]
dashdemux: remove dead code and variable
A recent commit made stream not able to be NULL, ending up with
a flag being always set to FALSE when it matters.
Coverity 1146968, 1147012
Vincent Penquerc'h [Thu, 10 Apr 2014 16:37:22 +0000 (17:37 +0100)]
curl: remove unneeded NULL check
We just checked for NULL and allocated if it was. And glib aborts
if it can't allocate, I'm told.
Coverity 1139841
Vincent Penquerc'h [Thu, 10 Apr 2014 16:33:55 +0000 (17:33 +0100)]
curl: remove duplicate assignment
Coverity 1197708
Sebastian Dröge [Thu, 10 Apr 2014 14:53:42 +0000 (16:53 +0200)]
hlsdemux: Also update the sequence position when updating non-live playlists
Sebastian Dröge [Thu, 10 Apr 2014 12:59:57 +0000 (14:59 +0200)]
hlsdemux: Try reloading the playlist first if downloading a fragment fails
But only add this for non-live playlists. For live playlists we already
have another thread that is periodically updating playlists.
Reason for this is that sometimes downloading a fragment can fail because
the URIs have changed or expired since last time.
Sebastian Dröge [Thu, 10 Apr 2014 12:46:01 +0000 (14:46 +0200)]
hlsdemux: When updating a non-live playlist make sure to find the current sequence by time
Sequence numbers in different playlists are not guaranteed to be the same for the
same position, e.g. fragments could have different durations in different playlists.
In theory we should do exactly the same for live playlists, but unfortunately we can't
because doing this kind of seeking requires the complete playlist since we started
playback. For live playlists the server is however dropping fragments in the beginning
over time and we have no absolute time references.
Vincent Penquerc'h [Wed, 9 Apr 2014 16:28:49 +0000 (17:28 +0100)]
smoothstreaming: avoid using an uninitialized manifest
If we did not set the manifest yet, early out in the seeking query.
Coverity 1139737
Thibault Saunier [Mon, 17 Mar 2014 15:39:42 +0000 (16:39 +0100)]
h264parse: Set framerate even for interlaced videos
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
https://bugzilla.gnome.org/show_bug.cgi?id=726752
Stefan Ringel [Wed, 9 Apr 2014 08:04:46 +0000 (10:04 +0200)]
mpegts: add atsc terrestrial virtual channel table
https://bugzilla.gnome.org/show_bug.cgi?id=727460
Santiago Carot-Nemesio [Wed, 9 Apr 2014 13:07:19 +0000 (15:07 +0200)]
liveadder: fix memory leak querying sink caps
https://bugzilla.gnome.org/show_bug.cgi?id=727894
Vincent Penquerc'h [Wed, 9 Apr 2014 17:44:38 +0000 (18:44 +0100)]
hlssink: catch failure to write playlist file
Coverity 1139613
Vincent Penquerc'h [Wed, 9 Apr 2014 17:31:31 +0000 (18:31 +0100)]
kate: fix implicit promotion to signed int breaking on largeish inputs
Coverity 1139858, 1139857
Vincent Penquerc'h [Wed, 9 Apr 2014 17:16:52 +0000 (18:16 +0100)]
ladspa: remove duplicate assignment
Coverity 1139706
Vincent Penquerc'h [Wed, 9 Apr 2014 17:12:58 +0000 (18:12 +0100)]
mimdec: fix open error checking
Coverity 206364
Vincent Penquerc'h [Wed, 9 Apr 2014 16:37:41 +0000 (17:37 +0100)]
schrodec: remove unnecessary check
The tag was dereferenced earier. From the libschroedinger code,
it's not obvious to see whether tag and frame would be NULL at
the same time. I think is likely that both will be non NULL
here, but that's not certain. Additional tests may be needed
to avoid dereferencing tag and/or frame, but what to do if
only one is NULL isn't obvious, as the _get_tag function does
transfer ownership so isn't undoable.
Coverity 1139850
Vincent Penquerc'h [Wed, 9 Apr 2014 16:10:06 +0000 (17:10 +0100)]
smoothstreaming: remove unnecessary check
The function is static, the only call site passes a non NULL
pointer, and the pointer is dereferenced before anyway.
Coverity 1139839
Vincent Penquerc'h [Wed, 9 Apr 2014 15:55:30 +0000 (16:55 +0100)]
srtp: remove dead assignment
Coverity 1197707
Vincent Penquerc'h [Wed, 9 Apr 2014 14:54:18 +0000 (15:54 +0100)]
mpegts: fix sdt length check
It was originally test for 9 bytes (as the comment says) and was
rewritten buggily. So rewrite it a third way, which is now
hopefully consistent with the original and the comment, while
being more sense-making to humans.
Coverity 1139654