[vlc-commits] transcode/video: refactor error handling
Thomas Guillem
git at videolan.org
Fri Jan 19 08:37:11 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 18 18:47:34 2018 +0100| [cb1b1634b812dc7f6d30c73216dfd49230448279] | committer: Thomas Guillem
transcode/video: refactor error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb1b1634b812dc7f6d30c73216dfd49230448279
---
modules/stream_out/transcode/video.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index a1ec18dc41..e26fc99576 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -832,12 +832,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
memcpy( &id->fmt_input_video, &p_pic->format, sizeof(video_format_t));
if( transcode_video_encoder_open( p_stream, id ) != VLC_SUCCESS )
- {
- picture_Release( p_pic );
- id->b_transcode = false;
- b_error = true;
- continue;
- }
+ goto error;
}
/* Run the filter and output chains; first with the picture,
@@ -869,6 +864,12 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
p_pic = NULL;
}
+ continue;
+error:
+ if( p_pic )
+ picture_Release( p_pic );
+ id->b_transcode = false;
+ b_error = true;
} while( p_pics );
if( p_sys->i_threads >= 1 )
More information about the vlc-commits
mailing list