Mercurial > libavcodec.hg
comparison rawdec.c @ 10895:1cebb3ea364b libavcodec
Correctly decode some Avid AV1x samples, fixes issue 1684.
| author | cehoyos |
|---|---|
| date | Sat, 16 Jan 2010 10:46:45 +0000 |
| parents | 1184d065c26a |
| children | 0f3a09795840 |
comparison
equal
deleted
inserted
replaced
| 10894:4b2227257766 | 10895:1cebb3ea364b |
|---|---|
| 135 dst[4*i+3]= buf[i] &3; | 135 dst[4*i+3]= buf[i] &3; |
| 136 } | 136 } |
| 137 buf= dst; | 137 buf= dst; |
| 138 } | 138 } |
| 139 | 139 |
| 140 if(avctx->codec_tag == MKTAG('A', 'V', '1', 'x')) | |
| 141 buf += buf_size - context->length; | |
| 142 | |
| 140 if(buf_size < context->length - (avctx->pix_fmt==PIX_FMT_PAL8 ? 256*4 : 0)) | 143 if(buf_size < context->length - (avctx->pix_fmt==PIX_FMT_PAL8 ? 256*4 : 0)) |
| 141 return -1; | 144 return -1; |
| 142 | 145 |
| 143 avpicture_fill(picture, buf, avctx->pix_fmt, avctx->width, avctx->height); | 146 avpicture_fill(picture, buf, avctx->pix_fmt, avctx->width, avctx->height); |
| 144 if(avctx->pix_fmt==PIX_FMT_PAL8 && buf_size < context->length){ | 147 if(avctx->pix_fmt==PIX_FMT_PAL8 && buf_size < context->length){ |
