diff options
author | Robert Krakora <rob.krakora@messagenetsystems.com> | 2013-08-19 15:31:51 -0400 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-08-20 18:57:01 +0100 |
commit | 006e7a3428bd097fc6e6c648332bff583dd434f9 (patch) | |
tree | a7f0bf29740047f82b58b844015eac9ffeecf5d4 /sys/uvch264 | |
parent | 7667b7920547166e2a1a9b835cae4e96c74ef3ba (diff) | |
download | gstreamer-plugins-bad-006e7a3428bd097fc6e6c648332bff583dd434f9.tar.gz |
uvch264src: don't error out on incomplete aux data segment
It appears that the Logitech C920 sometimes drops the next
to last segment of RAW aux data contained within the MJPEG
container. H264 data that is multiplexed with in the same
container does not appear to be affected. This appears to
be a bug in the Logitech C920 firmware and uvch264src should
not error out in this case.
Sometimes it can take 24 hours of continuous streaming for
the problem to occur, but sometimes it takes only a couple
of hours.
https://bugzilla.gnome.org/show_bug.cgi?id=706276
Diffstat (limited to 'sys/uvch264')
-rwxr-xr-x[-rw-r--r--] | sys/uvch264/gstuvch264_mjpgdemux.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/uvch264/gstuvch264_mjpgdemux.c b/sys/uvch264/gstuvch264_mjpgdemux.c index 3ff73aca7..99734ad5a 100644..100755 --- a/sys/uvch264/gstuvch264_mjpgdemux.c +++ b/sys/uvch264/gstuvch264_mjpgdemux.c @@ -481,6 +481,7 @@ gst_uvc_h264_mjpg_demux_chain (GstPad * pad, guint last_offset; guint i; GstMapInfo info; + guint16 segment_size; self = GST_UVC_H264_MJPG_DEMUX (GST_PAD_PARENT (pad)); @@ -496,7 +497,6 @@ gst_uvc_h264_mjpg_demux_chain (GstPad * pad, for (i = 0; i < info.size - 1; i++) { /* Check for APP4 (0xe4) marker in the jpeg */ if (info.data[i] == 0xff && info.data[i + 1] == 0xe4) { - guint16 segment_size; /* Sanity check sizes and get segment size */ if (i + 4 >= info.size) { @@ -686,9 +686,10 @@ gst_uvc_h264_mjpg_demux_chain (GstPad * pad, } if (aux_buf != NULL) { - GST_ELEMENT_ERROR (self, STREAM, DEMUX, - ("Incomplete auxiliary stream. %d bytes missing", aux_size), (NULL)); - ret = GST_FLOW_ERROR; + GST_DEBUG_OBJECT (self, "Incomplete auxiliary stream: %d bytes missing, " + "%d segment size remaining -- missing segment, C920 bug?", + aux_size, segment_size); + ret = GST_FLOW_OK; goto done; } |