diff options
author | John Stebbins <[email protected]> | 2016-12-27 08:57:06 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-12-27 08:57:06 -0800 |
commit | d64dba737d0136b58545be33c50db093df1880c1 (patch) | |
tree | 4f3bb3f2f9a9ebec014538d855cba9a6351cd330 | |
parent | 3b9c9a263f7ffa959d56d914c62df18c9567c0db (diff) |
encavcodec: fix 2 pass vp8 and vp9 encoding
libvpx only supplies the stats upon the final flush of the encoder. So
we must also write stats after final flush.
-rw-r--r-- | libhb/encavcodec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index 0543fe47c..591aa4f08 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -610,6 +610,15 @@ static void Flush( hb_work_object_t * w, hb_buffer_list_t * list ) hb_work_private_t * pv = w->private_data; avcodec_send_frame(pv->context, NULL); + + // Write stats + // vpx only writes stats at final flush + if (pv->job->pass_id == HB_PASS_ENCODE_1ST && + pv->context->stats_out != NULL) + { + fprintf( pv->file, "%s", pv->context->stats_out ); + } + get_packets(w, list); } |