summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2008-12-25 15:37:45 +0000
committerJulian Scheel <julian@jusst.de>2008-12-25 15:37:45 +0000
commit8ab46aacc70273916ed362fb712736ec1f2db62d (patch)
tree73aa77bb5320cc5b9567fc0afe24f068289263a9
parent3472b11d2a8e131fa297b8e3acf14e69394337ba (diff)
downloadxine-lib-8ab46aacc70273916ed362fb712736ec1f2db62d.tar.gz
xine-lib-8ab46aacc70273916ed362fb712736ec1f2db62d.tar.bz2
Fix PTS issues if the first incoming buf holds a PTS of 0.
-rw-r--r--src/libvdpau/vdpau_h264.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c
index f362d457d..3cd649cfa 100644
--- a/src/libvdpau/vdpau_h264.c
+++ b/src/libvdpau/vdpau_h264.c
@@ -337,8 +337,9 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen,
this->nal_parser->current_nal->sps != NULL &&
this->nal_parser->current_nal->pps != NULL) {
- if(this->last_pts == 0)
- this->last_pts = buf->pts;
+ if(this->last_pts == 0 || this->tmp_pts == 0) {
+ this->tmp_pts = this->last_pts = buf->pts;
+ }
struct pic_parameter_set_rbsp *pps = this->nal_parser->current_nal->pps;
struct seq_parameter_set_rbsp *sps = this->nal_parser->current_nal->sps;
@@ -490,11 +491,10 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen,
if(decoded_pic) {
if(decoded_pic->nal->nal_unit_type == NAL_SLICE_IDR &&
decoded_pic->img->pts != 0) {
- this->last_pts = decoded_pic->img->pts;
+ this->last_pts = this->tmp_pts = decoded_pic->img->pts;
}
decoded_pic->img->pts = this->last_pts;
- this->tmp_pts = decoded_pic->img->pts;
this->last_pts += this->video_step;
//printf("poc: %d, %d, pts: %lld\n", decoded_pic->nal->top_field_order_cnt, decoded_pic->nal->bottom_field_order_cnt, decoded_pic->img->pts);
decoded_pic->img->draw(decoded_pic->img, this->stream);