mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
vtenc: Error out if encoding returned an error
Otherwise we will just continue consuming frames until all memory is filled up and the app crashes.
This commit is contained in:
parent
e3bc32fb58
commit
0390398e39
1 changed files with 6 additions and 0 deletions
|
@ -771,6 +771,12 @@ gst_vtenc_enqueue_buffer (void *outputCallbackRefCon,
|
|||
gboolean is_keyframe;
|
||||
GstVideoCodecFrame *frame;
|
||||
|
||||
if (status != noErr) {
|
||||
GST_ELEMENT_ERROR (self, LIBRARY, ENCODE, (NULL), ("Failed to encode: %d",
|
||||
(int) status));
|
||||
goto beach;
|
||||
}
|
||||
|
||||
/* This may happen if we don't have enough bitrate */
|
||||
if (sampleBuffer == NULL)
|
||||
goto beach;
|
||||
|
|
Loading…
Reference in a new issue