summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-06-03 11:23:16 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-06-03 11:23:16 +0000
commit10f9ff9bf67149d3e07a124a069b45f466ae738d (patch)
tree40d7a65434dbf62c82ad7d54db5e3d15fa656d16 /libavcodec
parent8f3f2e067605b6ef537dd7aad8e0b8f4b67289ec (diff)
downloadffmpeg-streaming-10f9ff9bf67149d3e07a124a069b45f466ae738d.zip
ffmpeg-streaming-10f9ff9bf67149d3e07a124a069b45f466ae738d.tar.gz
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. Originally committed as revision 19079 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1236fcf..e0421fd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -557,6 +557,8 @@ int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *pic
av_init_packet(&avpkt);
avpkt.data = buf;
avpkt.size = buf_size;
+ // HACK for CorePNG to decode as normal PNG by default
+ avpkt.flags = AV_PKT_FLAG_KEY;
return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt);
}
OpenPOWER on IntegriCloud