X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fpacketizer%2Fmpegvideo.c;h=4857e21a177d640fc69cd73cbe73cb6950f6cbf8;hb=b2111baf468b4235e28a42343b7e283efda198a5;hp=6e838cbdcc538dc8b5b5cfbf06dbde75f2419669;hpb=cd3e5b41ba629df276314709b2a995e1a2fb6b3f;p=vlc diff --git a/modules/packetizer/mpegvideo.c b/modules/packetizer/mpegvideo.c index 6e838cbdcc..4857e21a17 100644 --- a/modules/packetizer/mpegvideo.c +++ b/modules/packetizer/mpegvideo.c @@ -2,7 +2,7 @@ * mpegvideo.c: parse and packetize an MPEG1/2 video stream ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: mpegvideo.c,v 1.30 2004/02/25 18:43:24 gbazin Exp $ + * $Id: mpegvideo.c,v 1.31 2004/03/03 11:09:30 massiot Exp $ * * Authors: Laurent Aimar * Eric Petit @@ -416,6 +416,19 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag ) p_sys->i_old_duration = i_duration; } + switch ( p_sys->i_picture_type ) + { + case 0x01: + p_pic->i_flags |= BLOCK_FLAG_TYPE_I; + break; + case 0x02: + p_pic->i_flags |= BLOCK_FLAG_TYPE_P; + break; + case 0x03: + p_pic->i_flags |= BLOCK_FLAG_TYPE_B; + break; + } + p_pic->i_length = p_sys->i_interpolated_dts - p_pic->i_dts; #if 0