From f8d198636b5291f4328d5b3f572cc084b68bda87 Mon Sep 17 00:00:00 2001 From: Johns Date: Fri, 27 Jan 2012 21:08:37 +0100 Subject: Video bug fix. Made video_test working again. Disabled VA-API Intel vaAssociateSubpicture workaround. Fix bug: Must release lock for VideoPollEvent. Allow faster video and audio sync. Fix bug: Software decoder use vaPutImage with Intel backend. Fix bug: Artefacts are shown after mpeg2 channel switch. Fix bug: VideoReleaseSurface called after VideoExit. --- codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'codec.c') diff --git a/codec.c b/codec.c index fcd3bc3..9f4c976 100644 --- a/codec.c +++ b/codec.c @@ -561,13 +561,13 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt) video_ctx->frame_number, used); } if (used != pkt->size) { - if (used >= 0) { + if (used >= 0 && used < pkt->size) { // some tv channels, produce this Debug(4, "codec: ooops didn't use complete video packet used %d of %d\n", used, pkt->size); - pkt->data += used; pkt->size -= used; + pkt->data += used; goto next_part; } Debug(3, "codec: bad frame %d\n", used); -- cgit v1.2.3