Skip to content

Commit

Permalink
codec: x265: move p_sys assignment down
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-janniaux authored and fkuehne committed Jan 13, 2023
1 parent 17f0c40 commit 5915c95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/codec/x265.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int Open (vlc_object_t *p_this)

p_enc->fmt_out.i_cat = VIDEO_ES;
p_enc->fmt_out.i_codec = VLC_CODEC_HEVC;
p_enc->p_sys = p_sys = malloc(sizeof(encoder_sys_t));
p_sys = malloc(sizeof(encoder_sys_t));
if (!p_sys)
return VLC_ENOMEM;

Expand Down Expand Up @@ -232,6 +232,7 @@ static int Open (vlc_object_t *p_this)
.encode_video = Encode,
};
p_enc->ops = &ops;
p_enc->p_sys = p_sys;

return VLC_SUCCESS;
}
Expand Down

0 comments on commit 5915c95

Please sign in to comment.