From b261d83b69692cfa13aada3266f3c832861a48a8 Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Fri, 5 Feb 2010 12:30:00 +0100 Subject: Fix freeze/crash on seeking When the parser was reset it did not forget about the last pts, which might cause metronom to freeze. On flush the cached vo_frame_t was kept in case the previously decode produced a 1st field and the decoder was waiting for 2nd field now. As on flush all images are released after drawing this could point to a invalid vo_frame_t --- src/video_dec/libvdpau/h264_parser.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_dec/libvdpau/h264_parser.c') diff --git a/src/video_dec/libvdpau/h264_parser.c b/src/video_dec/libvdpau/h264_parser.c index d26d53f0c..30c793975 100644 --- a/src/video_dec/libvdpau/h264_parser.c +++ b/src/video_dec/libvdpau/h264_parser.c @@ -1562,6 +1562,11 @@ void reset_parser(struct h264_parser *parser) parser->prev_top_field_order_cnt = 0; parser->curr_pic_num = 0; parser->flag_mask = 0; + + if(parser->pic != NULL) { + free_coded_picture(parser->pic); + parser->pic = create_coded_picture(); + } } void free_parser(struct h264_parser *parser) -- cgit v1.2.3