diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-12-09 10:24:16 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-12-09 10:24:16 +0100 |
commit | 66dc3ba356e6651e85098e6aab048c6680ea2845 (patch) | |
tree | 103b8591ece66c358e62d1a0517f1e1f4d5d7004 /libavcodec | |
parent | e8ca7cfa4f4207be9b07e6135e6ba7a95ba89aa8 (diff) | |
download | ffmpeg-66dc3ba356e6651e85098e6aab048c6680ea2845.tar.gz |
Flip zerocodec output.
Fixes ticket #1218
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/version.h | 2 | ||||
-rw-r--r-- | libavcodec/zerocodec.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/version.h b/libavcodec/version.h index ac33ccebdd..1aab993df8 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -30,7 +30,7 @@ #define LIBAVCODEC_VERSION_MAJOR 54 #define LIBAVCODEC_VERSION_MINOR 79 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c index f54abb1c1b..cba3198473 100644 --- a/libavcodec/zerocodec.c +++ b/libavcodec/zerocodec.c @@ -49,6 +49,9 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); return AVERROR_INVALIDDATA; } + + prev += (avctx->height - 1) * prev_pic->linesize[0]; + pic->key_frame = 0; pic->pict_type = AV_PICTURE_TYPE_P; } @@ -67,7 +70,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data, zstream->next_in = avpkt->data; zstream->avail_in = avpkt->size; - dst = pic->data[0]; + dst = pic->data[0] + (avctx->height - 1) * pic->linesize[0]; /** * ZeroCodec has very simple interframe compression. If a value @@ -90,8 +93,8 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data, for (j = 0; j < avctx->width << 1; j++) dst[j] += prev[j] & -!dst[j]; - prev += prev_pic->linesize[0]; - dst += pic->linesize[0]; + prev -= prev_pic->linesize[0]; + dst -= pic->linesize[0]; } /* Release the previous buffer if need be */ |