From b96d78bb4eee2d0421f5c39e6b5c1e96ed8e6fd3 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Mon, 22 Dec 2003 16:40:04 +0000 Subject: [PATCH] * modules/codec/libmpeg2.c: compiles with the latest libmpeg2 cvs. --- modules/codec/libmpeg2.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c index e63a3b57f4..2946913405 100755 --- a/modules/codec/libmpeg2.c +++ b/modules/codec/libmpeg2.c @@ -2,7 +2,7 @@ * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2. ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: libmpeg2.c,v 1.39 2003/12/22 14:32:55 sam Exp $ + * $Id: libmpeg2.c,v 1.40 2003/12/22 16:40:04 gbazin Exp $ * * Authors: Gildas Bazin * Christophe Massiot @@ -210,7 +210,13 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) if( p_block->i_pts ) { +#ifdef PIC_FLAG_PTS mpeg2_pts( p_sys->p_mpeg2dec, (uint32_t)p_block->i_pts ); + +#else /* New interface */ + mpeg2_tag_picture( p_sys->p_mpeg2dec, + (uint32_t)p_block->i_pts, 0/*dts*/ ); +#endif p_sys->i_previous_pts = p_sys->i_current_pts; p_sys->i_current_pts = p_block->i_pts; } @@ -337,11 +343,20 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) } p_sys->b_after_sequence_header = 0; +#ifdef PIC_FLAG_PTS i_pts = p_sys->p_info->current_picture->flags & PIC_FLAG_PTS ? ( ( p_sys->p_info->current_picture->pts == (uint32_t)p_sys->i_current_pts ) ? p_sys->i_current_pts : p_sys->i_previous_pts ) : 0; +#else /* New interface */ + + i_pts = p_sys->p_info->current_picture->flags & PIC_FLAG_TAGS ? + ( ( p_sys->p_info->current_picture->tag == + (uint32_t)p_sys->i_current_pts ) ? + p_sys->i_current_pts : p_sys->i_previous_pts ) : 0; +#endif + /* Hack to handle demuxers which only have DTS timestamps */ if( !i_pts && !p_block->i_pts && p_block->i_dts > 0 ) { -- 2.39.2