Fix #29824: Error writing frame if 3D scene starts after first frame of animation and output is H264
Issue was caused by incorrectly set PTS value frames came form Scene strip renderer. This value used to be calculated from RenderData current and start frame which lead to non-uniformuly counting which totally confuses encoder. Switch append_avi and append_ffmpeg to use current frame from rendering scene (which was already passing to this functions and was used mostly for logging) and start frame of rendering scene (it's new parameter added). This allowed to calculate correct PTS value easily and get rid of global static sframe variable in writeavi.c file.
This commit is contained in:
@@ -488,7 +488,8 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
|
||||
ok= oglrender->mh->append_movie(&scene->r, CFRA, (int*)ibuf->rect, oglrender->sizex, oglrender->sizey, oglrender->reports);
|
||||
ok= oglrender->mh->append_movie(&scene->r, SFRA, CFRA, (int*)ibuf->rect,
|
||||
oglrender->sizex, oglrender->sizey, oglrender->reports);
|
||||
if(ok) {
|
||||
printf("Append frame %d", scene->r.cfra);
|
||||
BKE_reportf(op->reports, RPT_INFO, "Appended frame: %d", scene->r.cfra);
|
||||
|
||||
Reference in New Issue
Block a user