GNOME Bugzilla – Bug 774150
video format changes after a few iterations and causes crash
Last modified: 2016-12-23 17:30:29 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
Which version of GStreamer is that with?
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.
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.