# HG changeset patch # User michael # Date 1036282555 0 # Node ID a3e7c0e16d5bca28c8fbbfe447d0b9a9f7ef00b8 # Parent cb911c5c3310064fa2ef861f793c54c6e1efc754 fixing vstats so B frames are shown as B and not P diff -r cb911c5c3310 -r a3e7c0e16d5b libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Sat Nov 02 23:33:51 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sun Nov 03 00:15:55 2002 +0000 @@ -569,7 +569,20 @@ fprintf(fvstats, "time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", all_frametime, (double)(len*8)/sh->frametime/1000.0, (double)(all_len*8)/all_frametime/1000.0); - fprintf(fvstats, "type= %c\n", sh->ds->flags&1 ? 'I' : 'P'); + switch(avctx->pict_type){ + case I_TYPE: + fprintf(fvstats, "type= I\n"); + break; + case P_TYPE: + fprintf(fvstats, "type= P\n"); + break; + case S_TYPE: + fprintf(fvstats, "type= S\n"); + break; + case B_TYPE: + fprintf(fvstats, "type= B\n"); + break; + } break; } //--