mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
jpegenc: pass flowreturn upstream
This commit is contained in:
parent
e12457f138
commit
30f5125fca
2 changed files with 4 additions and 2 deletions
|
@ -250,7 +250,7 @@ gst_jpegenc_term_destination (j_compress_ptr cinfo)
|
|||
|
||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (jpegenc->current_frame);
|
||||
|
||||
gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (jpegenc),
|
||||
jpegenc->res = gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (jpegenc),
|
||||
jpegenc->current_frame);
|
||||
jpegenc->current_frame = NULL;
|
||||
}
|
||||
|
@ -463,6 +463,7 @@ gst_jpegenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
|
|||
i) * stride[i];
|
||||
}
|
||||
|
||||
jpegenc->res = GST_FLOW_OK;
|
||||
jpegenc->output_mem = gst_allocator_alloc (NULL, jpegenc->bufsize, ¶ms);
|
||||
gst_memory_map (jpegenc->output_mem, &jpegenc->output_map, GST_MAP_READWRITE);
|
||||
|
||||
|
@ -520,7 +521,7 @@ gst_jpegenc_handle_frame (GstVideoEncoder * encoder, GstVideoCodecFrame * frame)
|
|||
jpeg_finish_compress (&jpegenc->cinfo);
|
||||
GST_LOG_OBJECT (jpegenc, "compressing done");
|
||||
|
||||
return GST_FLOW_OK;
|
||||
return jpegenc->res;
|
||||
|
||||
invalid_frame:
|
||||
{
|
||||
|
|
|
@ -56,6 +56,7 @@ struct _GstJpegEnc
|
|||
GstVideoCodecState *input_state;
|
||||
GstVideoFrame current_vframe;
|
||||
GstVideoCodecFrame *current_frame;
|
||||
GstFlowReturn res;
|
||||
|
||||
guint channels;
|
||||
|
||||
|
|
Loading…
Reference in a new issue