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 774150 - video format changes after a few iterations and causes crash
video format changes after a few iterations and causes crash
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.0
Other Linux
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-09 15:47 UTC by henning.hinze
Modified: 2016-12-23 17:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
source code (7.39 KB, text/x-c++src)
2016-11-09 15:47 UTC, henning.hinze
Details

Description henning.hinze 2016-11-09 15:47:49 UTC
Created attachment 339402 [details]
source code

i set up a pipeline for mp4 video files like that:

filesrc -> decodebin -> videoconverter -> capsfilter ("video/x-raw, format=RGB") -> appsink

and want to pull the samples from the video. after using gst_video_frame_map i want to release the resources with gst_video_frame_unmap to prevent memory leaking. however the program crashes with that output:

i could reproduce the error with this mp4 video: https://archive.org/details/test177

video info format: RGB
video frame meta info: RGB
video info format: RGB
video frame meta info: RGB
video info format: RGB
video frame meta info: RGB
video info format: RGB
video frame meta info: I420

** (gst-gl:16312): CRITICAL **: gst_video_frame_map_id: assertion 'info->finfo->format == meta->format' failed

** (gst-gl:16312): CRITICAL **: gst_video_frame_map_id: assertion 'info->finfo->format == meta->format' failed

(gst-gl:16312): GStreamer-CRITICAL **: gst_buffer_unmap: assertion 'GST_IS_BUFFER (buffer)' failed

(gst-gl:16312): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed

** (gst-gl:16312): CRITICAL **: gst_video_frame_map_id: assertion 'GST_IS_BUFFER (buffer)' failed

(gst-gl:16312): GStreamer-CRITICAL **: gst_pad_push: assertion 'GST_IS_BUFFER (buffer)' failed
Comment 1 Sebastian Dröge (slomo) 2016-11-09 15:51:56 UTC
Which version of GStreamer is that with?
Comment 2 Sebastian Dröge (slomo) 2016-11-09 15:52:50 UTC
Also the buffer and caps you get from the GstSample are not owned by you, you don't have (you must not) unref them afterwards. They are valid as long as you have a reference to the sample.
Comment 3 Tim-Philipp Müller 2016-12-23 17:30:29 UTC
Thanks for the bug report, but at first glance it looks like this is caused by your example code.

Please re-open if you can answer the questions asked in the previous comments and confirm that the issue still happens with the fixed example code. Please ideally also provide sample code in plain C.