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:
2012-01-13 09:20:13 +00:00
parent 14e75b6c84
commit 74aede4d71
9 changed files with 25 additions and 17 deletions

View File

@@ -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);