mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avcodec/pcx: fix decoding with AVFrame's negative linesize
This commit is contained in:
parent
ee357d6991
commit
cdf0931fdb
1 changed files with 2 additions and 1 deletions
|
|
@ -75,9 +75,10 @@ static int pcx_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
||||||
GetByteContext gb;
|
GetByteContext gb;
|
||||||
int compressed, xmin, ymin, xmax, ymax;
|
int compressed, xmin, ymin, xmax, ymax;
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, stride, y, x,
|
unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, y, x,
|
||||||
bytes_per_scanline;
|
bytes_per_scanline;
|
||||||
uint8_t *ptr, *scanline;
|
uint8_t *ptr, *scanline;
|
||||||
|
ptrdiff_t stride;
|
||||||
|
|
||||||
if (avpkt->size < PCX_HEADER_SIZE) {
|
if (avpkt->size < PCX_HEADER_SIZE) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Packet too small\n");
|
av_log(avctx, AV_LOG_ERROR, "Packet too small\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue