diff options
author | Julian Scheel <julian@jusst.de> | 2008-12-13 11:58:07 +0000 |
---|---|---|
committer | Julian Scheel <julian@jusst.de> | 2008-12-13 11:58:07 +0000 |
commit | f568815dd336855ddb9f5a8d84cee981197304f9 (patch) | |
tree | 01eb984aa4f32b3dcb8be44a4e8bfa9cb83f3afb /src | |
parent | 3cb09a6cf6cdc0e6aaa8e63ded14ea81388b5155 (diff) | |
download | xine-lib-f568815dd336855ddb9f5a8d84cee981197304f9.tar.gz xine-lib-f568815dd336855ddb9f5a8d84cee981197304f9.tar.bz2 |
Fix re-introduced mem-leak & progressive playback.
Diffstat (limited to 'src')
-rw-r--r-- | src/libvdpau/dpb.c | 3 | ||||
-rw-r--r-- | src/libvdpau/vdpau_h264.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libvdpau/dpb.c b/src/libvdpau/dpb.c index 8ea9fd069..d27611e64 100644 --- a/src/libvdpau/dpb.c +++ b/src/libvdpau/dpb.c @@ -20,7 +20,8 @@ struct decoded_picture* init_decoded_picture(struct nal_unit *src_nal, copy_nal_unit(pic->nal, src_nal); pic->top_is_reference = pic->nal->slc->field_pic_flag ? (pic->nal->slc->bottom_field_flag ? 0 : 1) : 1; - pic->bottom_is_reference = 0; + pic->bottom_is_reference = pic->nal->slc->field_pic_flag + ? (pic->nal->slc->bottom_field_flag ? 1 : 0) : 1; pic->surface = surface; pic->img = img; pic->next = NULL; diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c index e4faf5969..7b9299dae 100644 --- a/src/libvdpau/vdpau_h264.c +++ b/src/libvdpau/vdpau_h264.c @@ -353,6 +353,7 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen, // FIXME: do we really hit all cases here? if(((uint8_t*)vdp_buffer.bitstream) != NULL) { + free(vdp_buffer.bitstream); } if(status != VDP_STATUS_OK) @@ -364,11 +365,11 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen, img->bad_frame = 0; if(pic.is_reference) { - if(!this->wait_for_bottom_field) { + if(!slc->field_pic_flag || !this->wait_for_bottom_field) { struct decoded_picture *pic = init_decoded_picture(this->nal_parser->current_nal, surface, img); this->last_ref_pic = pic; dpb_add_picture(&(this->nal_parser->dpb), pic, sps->num_ref_frames); - } else { + } else if(slc->field_pic_flag && this->wait_for_bottom_field) { if(this->last_ref_pic) { this->last_ref_pic->bottom_is_reference = 1; } |