Browse Source

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

Originally committed as revision 17166 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Thierry Foucu Baptiste Coudurier 17 years ago
parent
commit
68a7aafff6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/gxfenc.c

+ 4
- 1
libavformat/gxfenc.c View File

@@ -175,8 +175,11 @@ static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)
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)


Loading…
Cancel
Save