[FFmpeg-cvslog] r17166 - trunk/libavformat/gxfenc.c

bcoudurier subversion
Thu Feb 12 01:08:44 CET 2009


Author: bcoudurier
Date: Thu Feb 12 01:08:44 2009
New Revision: 17166

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

Modified:
   trunk/libavformat/gxfenc.c

Modified: trunk/libavformat/gxfenc.c
==============================================================================
--- trunk/libavformat/gxfenc.c	Thu Feb 12 00:49:54 2009	(r17165)
+++ trunk/libavformat/gxfenc.c	Thu Feb 12 01:08:44 2009	(r17166)
@@ -175,8 +175,11 @@ static int gxf_write_mpeg_auxiliary(Byte
         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)




More information about the ffmpeg-cvslog mailing list