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
@ -771,6 +771,12 @@ gst_vtenc_enqueue_buffer (void *outputCallbackRefCon,
|
|||||||
gboolean is_keyframe;
|
gboolean is_keyframe;
|
||||||
GstVideoCodecFrame *frame;
|
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 */
|
/* This may happen if we don't have enough bitrate */
|
||||||
if (sampleBuffer == NULL)
|
if (sampleBuffer == NULL)
|
||||||
goto beach;
|
goto beach;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user