X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fr210dec.c;h=fc9e7e5ce5893a4a3dcfe48c31516e9b722121cc;hb=575ed4fe37fdb1558fbbc261661b6239d47bcd8c;hp=a2e1a070e1186a510cb7c094c0204198496893a7;hpb=e7521d9771eac5ba07558b2b2dba1155e57b9670;p=ffmpeg diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c index a2e1a070e11..fc9e7e5ce58 100644 --- a/libavcodec/r210dec.c +++ b/libavcodec/r210dec.c @@ -47,6 +47,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64); uint8_t *dst_line; int r10 = (avctx->codec_tag & 0xFFFFFF) == MKTAG('r', '1', '0', 0); + int le = avctx->codec_tag == MKTAG('R', '1', '0', 'k') && + avctx->extradata_size >= 12 && !memcmp(&avctx->extradata[4], "DpxE", 4) && + !avctx->extradata[11]; if (avpkt->size < 4 * aligned_width * avctx->height) { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); @@ -65,7 +68,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, for (w = 0; w < avctx->width; w++) { uint32_t pixel; uint16_t r, g, b; - if (avctx->codec_id == AV_CODEC_ID_AVRP || r10) { + if (avctx->codec_id == AV_CODEC_ID_AVRP || r10 || le) { pixel = av_le2ne32(*src++); } else { pixel = av_be2ne32(*src++);