diff options
author | Christophe Thommeret <hftom@free.fr> | 2009-02-19 23:45:58 +0000 |
---|---|---|
committer | Christophe Thommeret <hftom@free.fr> | 2009-02-19 23:45:58 +0000 |
commit | 27069809bf3dd57ab1006dda6ffdd10a7ae86687 (patch) | |
tree | 72d112a8026808d35c88a5b3007645dc99f63bc0 | |
parent | 384743ff9ccb078750de9563d82a46e63b97f74f (diff) | |
download | xine-lib-27069809bf3dd57ab1006dda6ffdd10a7ae86687.tar.gz xine-lib-27069809bf3dd57ab1006dda6ffdd10a7ae86687.tar.bz2 |
Fix mpeg progressive flag.
-rw-r--r-- | src/libvdpau/vdpau_mpeg12.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libvdpau/vdpau_mpeg12.c b/src/libvdpau/vdpau_mpeg12.c index c97c7cf9a..dbcc77783 100644 --- a/src/libvdpau/vdpau_mpeg12.c +++ b/src/libvdpau/vdpau_mpeg12.c @@ -1,4 +1,5 @@ /* + * Copyright (C) 2008 the xine project * Copyright (C) 2008 Christophe Thommeret <hftom@free.fr> * * This file is part of xine, a free video player. @@ -185,6 +186,7 @@ static void reset_picture( picture_t *pic ) pic->slices_count2 = 0; pic->slices_pos = 0; pic->slices_pos_top = 0; + pic->progressive_frame = 0; pic->state = WANT_HEADER; } @@ -692,9 +694,11 @@ static void decode_picture( vdpau_mpeg12_decoder_t *vd ) else img->top_field_first = 0; - /* progressive_frame is unreliable with most mpeg2 streams - img->progressive_frame = pic->progressive_frame;*/ - img->progressive_frame = 0; + /* progressive_frame is unreliable with most mpeg2 streams */ + if ( pic->vdp_infos.picture_structure!=PICTURE_FRAME ) + img->progressive_frame = 0; + else + img->progressive_frame = pic->progressive_frame; if ( pic->vdp_infos.picture_coding_type!=B_FRAME ) { if ( pic->vdp_infos.picture_coding_type==I_FRAME && !seq->backward_ref ) { @@ -731,11 +735,6 @@ static void vdpau_mpeg12_decode_data (video_decoder_t *this_gen, buf_element_t * vdpau_mpeg12_decoder_t *this = (vdpau_mpeg12_decoder_t *) this_gen; sequence_t *seq = (sequence_t*)&this->sequence; - if (buf->decoder_flags & BUF_FLAG_FRAMERATE) { - /*seq->video_step = buf->decoder_info[0]; - _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, seq->video_step);*/ - } - if ( !buf->size ) return; |