diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-15 19:38:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-15 19:38:46 +0200 |
commit | 33651e3edffcf404e7dce33395b31b1113e5d4b2 (patch) | |
tree | 97827626e4e2f324d611b706f5066d688f630b2e /libavcodec/utils.c | |
parent | d46aada5c2c71b9b0a259e62699cab25837053b2 (diff) | |
download | ffmpeg-33651e3edffcf404e7dce33395b31b1113e5d4b2.tar.gz |
Revert "lavc: remove the FF_API_VIDEO_OLD cruft."
This reverts commit e89e5afdd04a0f081ecc38b528c1147f204027d7.
Conflicts:
libavcodec/utils.c
libavcodec/version.h
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0c03c5224d..b169c9b9d1 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -736,6 +736,22 @@ static int64_t guess_correct_pts(AVCodecContext *ctx, return pts; } +#if FF_API_VIDEO_OLD +int attribute_align_arg avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, + int *got_picture_ptr, + const uint8_t *buf, int buf_size) +{ + AVPacket avpkt; + 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); +} +#endif + int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt) |