summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Thommeret <hftom@free.fr>2008-12-19 14:08:24 +0000
committerChristophe Thommeret <hftom@free.fr>2008-12-19 14:08:24 +0000
commit9f95af243b2a3845e4e37bafa53f44760a3586df (patch)
tree519aad457c424718d9180466644b01fc72746161
parent7483f01445e287d5817d7aa44caeab406ab88abc (diff)
downloadxine-lib-9f95af243b2a3845e4e37bafa53f44760a3586df.tar.gz
xine-lib-9f95af243b2a3845e4e37bafa53f44760a3586df.tar.bz2
Release refframes at reset/dispose.
-rw-r--r--src/libvdpau/vdpau_h264.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c
index e8b0088e4..9d461063b 100644
--- a/src/libvdpau/vdpau_h264.c
+++ b/src/libvdpau/vdpau_h264.c
@@ -517,7 +517,23 @@ static void vdpau_h264_flush (video_decoder_t *this_gen) {
static void vdpau_h264_reset (video_decoder_t *this_gen) {
vdpau_h264_decoder_t *this = (vdpau_h264_decoder_t *) this_gen;
+ printf("vdpau_h264_reset\n");
+
this->size = 0;
+
+ dpb_flush( &(this->nal_parser->dpb) );
+
+ if (this->decoder_initialized)
+ this->vdpau_accel->vdp_decoder_destroy( this->decoder );
+
+ this->decoder_started = 0;
+ this->decoder_initialized = 0;
+ this->nal_parser = init_parser();
+ this->buf = NULL;
+ this->wait_for_bottom_field = 0;
+ this->video_step = 0;
+ this->last_pts = 0;
+ this->tmp_pts = 0;
}
/*
@@ -540,6 +556,8 @@ static void vdpau_h264_dispose (video_decoder_t *this_gen) {
this->buf = NULL;
}
+ dpb_flush( &(this->nal_parser->dpb) );
+
if (this->decoder_initialized) {
this->vdpau_accel->vdp_decoder_destroy( this->decoder );
this->decoder_initialized = 0;