diff options
author | Julian Scheel <julian@jusst.de> | 2008-12-15 15:03:14 +0000 |
---|---|---|
committer | Julian Scheel <julian@jusst.de> | 2008-12-15 15:03:14 +0000 |
commit | dd0712cc351add6f93b07a122e40ce4c842591a2 (patch) | |
tree | 716419301dd84508252603774bbfe48c02612f1b /src | |
parent | c3c01b015a95a367b2bc975132f97038e5e1b71c (diff) | |
download | xine-lib-dd0712cc351add6f93b07a122e40ce4c842591a2.tar.gz xine-lib-dd0712cc351add6f93b07a122e40ce4c842591a2.tar.bz2 |
Fix reordering.
Diffstat (limited to 'src')
-rw-r--r-- | src/libvdpau/nal.c | 11 | ||||
-rw-r--r-- | src/libvdpau/vdpau_h264.c | 8 |
2 files changed, 12 insertions, 7 deletions
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; } } |