[FFmpeg-devel] [PATCH] avcodec_decode_video must set PKT_FLAG_KEY

Michael Niedermayer michaelni
Wed Jun 3 12:34:31 CEST 2009


On Tue, Jun 02, 2009 at 12:30:32AM +0200, Reimar D?ffinger wrote:
> Hello,
> with avcodec_decode_video MPNG videos decode to a total mess, since it
> does not set PKT_FLAG_KEY and thus all consecutive frames are
> interpreted as delta frames.
> Following patch fixes that, of course CorePNG support is not possible
> like that.
> 
> Index: libavcodec/utils.c
> ===================================================================
> --- libavcodec/utils.c  (revision 19072)
> +++ libavcodec/utils.c  (working copy)
> @@ -557,6 +557,8 @@
>      av_init_packet(&avpkt);
>      avpkt.data = buf;
>      avpkt.size = buf_size;
> +    // HACK for CorePNG to decode as normal PNG by default
> +    avpkt.flags = PKT_FLAG_KEY;
>  
>      return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt);
>  }

ok

> 
> 
> But there is another issue: PKT_FLAG_KEY was made part of the public API
> it seems (if it isn't it needs to be made, otherwise MPNG can no longer
> be decoded correctly), but it hasn't been given the correct AV_ prefix,
> what to do about that?

yes

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090603/98fda15e/attachment.pgp>



More information about the ffmpeg-devel mailing list