aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-17 03:19:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-17 03:19:11 +0200
commit4e2e3d943ef01053e45987f7cd7d18e663f15592 (patch)
tree65a957e76fcf48a4f577ffad15d69d994322aab2 /libavcodec
parentadbb75dbd8eabdaa7439633d26a79eb5b7387ef9 (diff)
downloadffmpeg-4e2e3d943ef01053e45987f7cd7d18e663f15592.tar.gz
ffv1: fix packed rgb with 1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 0a70b6551f..6341114072 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -1237,7 +1237,11 @@ static int encode_slice(AVCodecContext *c, void *arg){
int x= fs->slice_x;
int y= fs->slice_y;
AVFrame * const p= &f->picture;
- const int ps= (f->bits_per_raw_sample>8)+1;
+ const int ps= (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
+ ?
+ (f->bits_per_raw_sample>8)+1
+ :
+ 4;
if(p->key_frame)
clear_slice_state(f, fs);
@@ -1657,7 +1661,11 @@ static int decode_slice(AVCodecContext *c, void *arg){
FFV1Context *fs= *(void**)arg;
FFV1Context *f= fs->avctx->priv_data;
int width, height, x, y;
- const int ps= (c->bits_per_raw_sample>8)+1;
+ const int ps= (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
+ ?
+ (c->bits_per_raw_sample>8)+1
+ :
+ 4;
AVFrame * const p= &f->picture;
if(f->version > 2){