diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2011-01-22 23:14:57 +0100 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2011-01-22 23:14:57 +0100 |
commit | 4871002a37587beb2e9c24fcd9bac0c7a9ba6a29 (patch) | |
tree | 4d6ad89eecb6462c811332216ce030c47136f832 | |
parent | e91820984115b186778f3acf2130d2d78a30a877 (diff) | |
download | xine-lib-4871002a37587beb2e9c24fcd9bac0c7a9ba6a29.tar.gz xine-lib-4871002a37587beb2e9c24fcd9bac0c7a9ba6a29.tar.bz2 |
Fix handling of H.264 end of sequence NAL unit for still images
Currently a parsed picture was only decoded when the parser came across a
NAL unit which started a new picture (aka access unit). An end of sequence
NAL unit must be handled like the access unit delimiter NAL unit, as both
terminate the current access unit.
Handling the end of sequence NAL unit in this way fixes displaying of still
images which end in an end of seqeunce NAL unit. Otherwise they were not
decoded at all (in case of a still frame) or the second field was missing
(in case of a still image which had been coded as a pair of fields).
-rw-r--r-- | src/video_dec/libvdpau/h264_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_dec/libvdpau/h264_parser.c b/src/video_dec/libvdpau/h264_parser.c index 81621f070..d495bf483 100644 --- a/src/video_dec/libvdpau/h264_parser.c +++ b/src/video_dec/libvdpau/h264_parser.c @@ -1825,6 +1825,8 @@ int parse_nal(uint8_t *buf, int buf_len, struct h264_parser *parser, * we detect the start of a new access unit if * a non-vcl nal unit is received after a vcl * nal unit + * NAL_END_OF_SEQUENCE terminates the current + * access unit */ if (nal->nal_unit_type >= NAL_SLICE && nal->nal_unit_type <= NAL_SLICE_IDR) { @@ -1832,7 +1834,8 @@ int parse_nal(uint8_t *buf, int buf_len, struct h264_parser *parser, } else if ((parser->position == VCL && nal->nal_unit_type >= NAL_SEI && nal->nal_unit_type <= NAL_PPS) || - nal->nal_unit_type == NAL_AU_DELIMITER) { + nal->nal_unit_type == NAL_AU_DELIMITER || + nal->nal_unit_type == NAL_END_OF_SEQUENCE) { /* start of a new access unit! */ *completed_picture = parser->pic; parser->pic = create_coded_picture(); |