Commit c6067a2d authored by bcoudurier's avatar bcoudurier

compute b_per_i_or_p value correctly, patch by Thierry Foucu, tfoucu at gmail dot com

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17166 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5fc1cf00
...@@ -175,8 +175,11 @@ static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx) ...@@ -175,8 +175,11 @@ static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)
ctx->p_per_gop = ctx->pframes / ctx->iframes; ctx->p_per_gop = ctx->pframes / ctx->iframes;
if (ctx->pframes % ctx->iframes) if (ctx->pframes % ctx->iframes)
ctx->p_per_gop++; ctx->p_per_gop++;
if (ctx->pframes) if (ctx->pframes) {
ctx->b_per_i_or_p = ctx->bframes / 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) if (ctx->p_per_gop > 9)
ctx->p_per_gop = 9; /* ensure value won't take more than one char */ ctx->p_per_gop = 9; /* ensure value won't take more than one char */
if (ctx->b_per_i_or_p > 9) if (ctx->b_per_i_or_p > 9)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment