Commit fb1d45f8 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

transcode/video: refactor error handling

(cherry picked from commit cb1b1634)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent f3ff4e6c
...@@ -826,12 +826,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id, ...@@ -826,12 +826,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)); memcpy( &id->fmt_input_video, &p_pic->format, sizeof(video_format_t));
if( transcode_video_encoder_open( p_stream, id ) != VLC_SUCCESS ) if( transcode_video_encoder_open( p_stream, id ) != VLC_SUCCESS )
{ goto error;
picture_Release( p_pic );
id->b_transcode = false;
b_error = true;
continue;
}
} }
/* Run the filter and output chains; first with the picture, /* Run the filter and output chains; first with the picture,
...@@ -863,6 +858,12 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id, ...@@ -863,6 +858,12 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
p_pic = NULL; p_pic = NULL;
} }
continue;
error:
if( p_pic )
picture_Release( p_pic );
id->b_transcode = false;
b_error = true;
} while( p_pics ); } while( p_pics );
if( p_sys->i_threads >= 1 ) if( p_sys->i_threads >= 1 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment