comparison utils.c @ 9787:f114b5f2ac47 libavcodec

Set AV_PKT_FLAG_KEY in avcodec_decode_video. This fixes decoding of MPNG, which currently is incorrectly decoded as CorePNG delta frames. CorePNG can not be correctly decoded via this old API either way.
author reimar
date Wed, 03 Jun 2009 11:23:16 +0000
parents 0d6f887d91fb
children 7ad7d4094d1f
comparison
equal deleted inserted replaced
9786:798d6520c7f4 9787:f114b5f2ac47
555 { 555 {
556 AVPacket avpkt; 556 AVPacket avpkt;
557 av_init_packet(&avpkt); 557 av_init_packet(&avpkt);
558 avpkt.data = buf; 558 avpkt.data = buf;
559 avpkt.size = buf_size; 559 avpkt.size = buf_size;
560 // HACK for CorePNG to decode as normal PNG by default
561 avpkt.flags = AV_PKT_FLAG_KEY;
560 562
561 return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt); 563 return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt);
562 } 564 }
563 #endif 565 #endif
564 566