diff options
author | Julian Scheel <none@none> | 2010-01-12 20:44:25 +0100 |
---|---|---|
committer | Julian Scheel <none@none> | 2010-01-12 20:44:25 +0100 |
commit | 3826d6f0d8c532c9da7613fe51223f580ece917c (patch) | |
tree | 8e39c40114f0cf4052688fc4d8d4c59ca6931363 /src | |
parent | ebe9b35496a2382c7d851a7be22faa850331e8f4 (diff) | |
download | xine-lib-3826d6f0d8c532c9da7613fe51223f580ece917c.tar.gz xine-lib-3826d6f0d8c532c9da7613fe51223f580ece917c.tar.bz2 |
always draw still images. a still image is detected by the immediate following of an end of sequence mark, so that it is safe to remove backward references after decoding it.
this will make the drawing logic work and draw the picture actually
this fixed dvd menus with still images in background which were not always drawn
Diffstat (limited to 'src')
-rw-r--r-- | src/video_dec/libvdpau/vdpau_mpeg12.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/video_dec/libvdpau/vdpau_mpeg12.c b/src/video_dec/libvdpau/vdpau_mpeg12.c index 09399ac3b..1b53b9cbe 100644 --- a/src/video_dec/libvdpau/vdpau_mpeg12.c +++ b/src/video_dec/libvdpau/vdpau_mpeg12.c @@ -660,7 +660,7 @@ static void decode_render( vdpau_mpeg12_decoder_t *vd, vdpau_accel_t *accel ) -static void decode_picture( vdpau_mpeg12_decoder_t *vd ) +static void decode_picture( vdpau_mpeg12_decoder_t *vd, uint8_t end_of_sequence ) { sequence_t *seq = (sequence_t*)&vd->sequence; picture_t *pic = (picture_t*)&seq->picture; @@ -740,6 +740,12 @@ static void decode_picture( vdpau_mpeg12_decoder_t *vd ) img->bad_frame = 0; img->duration = seq->video_step; + if ( end_of_sequence ) { + if ( seq->backward_ref ) + seq->backward_ref->free( seq->backward_ref ); + seq->backward_ref = NULL; + } + /* trying to deal with (french) buggy streams that randomly set bottom_field_first while stream is top_field_first. So we assume that when top_field_first is set one time, the stream _is_ top_field_first. */ @@ -813,7 +819,7 @@ static void vdpau_mpeg12_decode_data (video_decoder_t *this_gen, buf_element_t * } else { if ( parse_code( this, seq->buf+seq->start, seq->bufseek-seq->start ) ) { - decode_picture( this ); + decode_picture( this, 0 ); parse_code( this, seq->buf+seq->start, seq->bufseek-seq->start ); } uint8_t *tmp = (uint8_t*)malloc(seq->bufsize); @@ -831,7 +837,7 @@ static void vdpau_mpeg12_decode_data (video_decoder_t *this_gen, buf_element_t * /* still image detection -- don't wait for further data if buffer ends in sequence end code */ if (seq->start >= 0 && seq->buf[seq->start + 3] == sequence_end_code) { if (parse_code(this, seq->buf+seq->start, 4)) { - decode_picture(this); + decode_picture(this, 1); parse_code(this, seq->buf+seq->start, 4); } seq->start = -1; |