diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2011-01-23 00:59:24 +0100 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2011-01-23 00:59:24 +0100 |
commit | dc70c32e0f7614f52958e1b37da5b215aaafaafe (patch) | |
tree | fbeb37dd469440cb1275740082ecaba508e925a4 | |
parent | 4871002a37587beb2e9c24fcd9bac0c7a9ba6a29 (diff) | |
download | xine-lib-dc70c32e0f7614f52958e1b37da5b215aaafaafe.tar.gz xine-lib-dc70c32e0f7614f52958e1b37da5b215aaafaafe.tar.bz2 |
Avoid "broken stream" message in vdpau_decoder_render, caused by decoder_init
The image allocated in decoder_init can immediately be freed after getting
access to accel_data. Accessing the accel pointer afterwards is safe for non
frame related functions although the frame has been freed as freed frames are
not deallocated but put into a free frame queue.
-rw-r--r-- | src/video_dec/libvdpau/vdpau_h264.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/video_dec/libvdpau/vdpau_h264.c b/src/video_dec/libvdpau/vdpau_h264.c index e16c800a7..5c4edc6c3 100644 --- a/src/video_dec/libvdpau/vdpau_h264.c +++ b/src/video_dec/libvdpau/vdpau_h264.c @@ -420,18 +420,11 @@ static int vdpau_decoder_init(video_decoder_t *this_gen) XINE_IMGFMT_VDPAU, VO_BOTH_FIELDS | this->reset); this->reset = 0; - img->duration = this->video_step; - img->pts = this->completed_pic->pts; - - if (this->dangling_img) { - xprintf(this->xine, XINE_VERBOSITY_LOG, - "broken stream: current img wasn't processed -- freeing it\n!"); - this->dangling_img->free(this->dangling_img); - } - this->dangling_img = img; - this->vdpau_accel = (vdpau_accel_t*)img->accel_data; + img->free(img); + img = NULL; + /*VdpBool is_supported; uint32_t max_level, max_references, max_width, max_height;*/ if(this->vdpau_accel->vdp_runtime_nr > 0) { |