mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
applemedia: fix segfault with dropped frames
This commit is contained in:
parent
d9db0c2d4a
commit
3b249f6761
1 changed files with 8 additions and 1 deletions
|
@ -510,8 +510,15 @@ gst_vtdec_enqueue_frame (void *data1, void *data2, VTStatus result,
|
||||||
GstBuffer *src_buf = GST_BUFFER (data2);
|
GstBuffer *src_buf = GST_BUFFER (data2);
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
|
||||||
if (result != kVTSuccess)
|
if (result != kVTSuccess) {
|
||||||
|
GST_ERROR_OBJECT (self, "Error decoding frame %d", result);
|
||||||
goto beach;
|
goto beach;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kVTDecodeInfo_FrameDropped & info) {
|
||||||
|
GST_WARNING_OBJECT (self, "Frame dropped");
|
||||||
|
goto beach;
|
||||||
|
}
|
||||||
|
|
||||||
buf = gst_core_video_buffer_new (cvbuf, &self->vinfo);
|
buf = gst_core_video_buffer_new (cvbuf, &self->vinfo);
|
||||||
gst_buffer_copy_into (buf, self->cur_inbuf, GST_BUFFER_COPY_METADATA, 0, -1);
|
gst_buffer_copy_into (buf, self->cur_inbuf, GST_BUFFER_COPY_METADATA, 0, -1);
|
||||||
|
|
Loading…
Reference in a new issue