Mercurial > libavformat.hg
changeset 4457:6ed62b8257dd libavformat
compute b_per_i_or_p value correctly, patch by Thierry Foucu, tfoucu at gmail dot com
author | bcoudurier |
---|---|
date | Thu, 12 Feb 2009 00:08:44 +0000 |
parents | 833d30447d64 |
children | f734aba9452e |
files | gxfenc.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gxfenc.c Wed Feb 11 23:49:54 2009 +0000 +++ b/gxfenc.c Thu Feb 12 00:08:44 2009 +0000 @@ -175,8 +175,11 @@ ctx->p_per_gop = ctx->pframes / ctx->iframes; if (ctx->pframes % ctx->iframes) ctx->p_per_gop++; - if (ctx->pframes) + if (ctx->pframes) { ctx->b_per_i_or_p = ctx->bframes / ctx->pframes; + if (ctx->bframes % ctx->pframes) + ctx->b_per_i_or_p++; + } if (ctx->p_per_gop > 9) ctx->p_per_gop = 9; /* ensure value won't take more than one char */ if (ctx->b_per_i_or_p > 9)