Skip to content

Commit

Permalink
ffv1: fix packed rgb with 1.3
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Oct 17, 2012
1 parent adbb75d commit 4e2e3d9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libavcodec/ffv1.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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){
Expand Down

0 comments on commit 4e2e3d9

Please sign in to comment.