mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
deinterlace: Instead of confusing crashes later, just error out immediately if mapping a video frame fails
This probably still crashes but at least we get some hint about what goes wrong instead of random behaviour later.
This commit is contained in:
parent
1bb9d9c682
commit
0c84b1b104
1 changed files with 5 additions and 1 deletions
|
@ -744,7 +744,11 @@ gst_video_frame_new_and_map (GstVideoInfo * vinfo, GstBuffer * buffer,
|
|||
GstMapFlags flags)
|
||||
{
|
||||
GstVideoFrame *frame = g_malloc0 (sizeof (GstVideoFrame));
|
||||
gst_video_frame_map (frame, vinfo, buffer, flags);
|
||||
if (!gst_video_frame_map (frame, vinfo, buffer, flags)) {
|
||||
g_free (frame);
|
||||
g_return_val_if_reached (NULL);
|
||||
return NULL;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue