After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792167 - omxvideoenc: early return in fill_buffer() if something goes wrong
omxvideoenc: early return in fill_buffer() if something goes wrong
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-03 15:11 UTC by Guillaume Desmottes
Modified: 2018-01-07 14:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxvideoenc: early return in fill_buffer() if something goes wrong (2.20 KB, patch)
2018-01-03 15:12 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2018-01-03 15:11:59 UTC
.
Comment 1 Guillaume Desmottes 2018-01-03 15:12:24 UTC
Created attachment 366245 [details] [review]
omxvideoenc: early return in fill_buffer() if something goes wrong

If something goes wrong while trying to manually copy the input buffer,
the 'break' was moving us out of the 'for' loop but not out of the switch block.
So we ended up calling gst_video_frame_unmap() a second time (raising
assertions) and returning TRUE rather than FALSE.

Reproduced with a WIP zynqultrascaleplus OMX branch reporting wrong
buffer sizes and so triggering this bug.
Comment 2 Tim-Philipp Müller 2018-01-07 14:24:01 UTC
commit 5fa96cab7bf92d6840ab1c69824a94009acec2fc
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Wed Jan 3 16:07:18 2018 +0100

    omxvideoenc: early return in fill_buffer() if something goes wrong
    
    If something goes wrong while trying to manually copy the input buffer,
    the 'break' was moving us out of the 'for' loop but not out of the switch block.
    So we ended up calling gst_video_frame_unmap() a second time (raising
    assertions) and returning TRUE rather than FALSE.
    
    Reproduced with a WIP zynqultrascaleplus OMX branch reporting wrong
    buffer sizes and so triggering this bug.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792167