Mercurial > libavcodec.hg
diff mpegvideo.c @ 2298:3a8e557a8226 libavcodec
support strictly enforcing gop size
author | michael |
---|---|
date | Fri, 15 Oct 2004 02:37:04 +0000 |
parents | 41b5a7bd9a96 |
children | 5e5cf598a48b |
line wrap: on
line diff
--- a/mpegvideo.c Thu Oct 14 12:24:16 2004 +0000 +++ b/mpegvideo.c Fri Oct 15 02:37:04 2004 +0000 @@ -2064,9 +2064,13 @@ } if(s->picture_in_gop_number + b_frames >= s->gop_size){ + if((s->flags2 & CODEC_FLAG2_STRICT_GOP) && s->gop_size > s->picture_in_gop_number){ + b_frames= s->gop_size - s->picture_in_gop_number - 1; + }else{ if(s->flags & CODEC_FLAG_CLOSED_GOP) b_frames=0; s->input_picture[b_frames]->pict_type= I_TYPE; + } } if( (s->flags & CODEC_FLAG_CLOSED_GOP)