From dd0712cc351add6f93b07a122e40ce4c842591a2 Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Mon, 15 Dec 2008 15:03:14 +0000 Subject: Fix reordering. --- src/libvdpau/nal.c | 11 ++++++++--- src/libvdpau/vdpau_h264.c | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/libvdpau/nal.c b/src/libvdpau/nal.c index 0964c446e..366aefd4e 100644 --- a/src/libvdpau/nal.c +++ b/src/libvdpau/nal.c @@ -43,9 +43,14 @@ void copy_nal_unit(struct nal_unit *dest, struct nal_unit *src) xine_fast_memcpy(dest, src, size); - dest->sps = malloc(sizeof(struct seq_parameter_set_rbsp)); - dest->pps = malloc(sizeof(struct pic_parameter_set_rbsp)); - dest->slc = malloc(sizeof(struct slice_header)); + if(!dest->sps) + dest->sps = malloc(sizeof(struct seq_parameter_set_rbsp)); + + if(!dest->pps) + dest->pps = malloc(sizeof(struct pic_parameter_set_rbsp)); + + if(!dest->slc) + dest->slc = malloc(sizeof(struct slice_header)); xine_fast_memcpy(dest->sps, src->sps, sizeof(struct seq_parameter_set_rbsp)); xine_fast_memcpy(dest->pps, src->pps, sizeof(struct pic_parameter_set_rbsp)); diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c index 313790e11..574386b67 100644 --- a/src/libvdpau/vdpau_h264.c +++ b/src/libvdpau/vdpau_h264.c @@ -324,7 +324,7 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen, if(!this->decoder_started) this->decoder_started = 1; - dump_pictureinfo_h264(&pic); + //dump_pictureinfo_h264(&pic); /*int i; printf("Decode data: \n"); @@ -392,9 +392,9 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen, } else if(slc->field_pic_flag && this->wait_for_bottom_field) { if(this->last_ref_pic) { decoded_pic = this->last_ref_pic; - free_nal_unit(decoded_pic->nal); - decoded_pic->nal = init_nal_unit(); - copy_nal_unit(decoded_pic->nal, this->nal_parser->current_nal); + //copy_nal_unit(decoded_pic->nal, this->nal_parser->current_nal); + decoded_pic->nal->top_field_order_cnt = this->nal_parser->current_nal->top_field_order_cnt; + decoded_pic->nal->bottom_field_order_cnt = this->nal_parser->current_nal->bottom_field_order_cnt; this->last_ref_pic->bottom_is_reference = 1; } } -- cgit v1.2.3