diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-28 00:27:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-28 00:27:57 +0100 |
commit | 2a9c50798b798057f82f55bc7564356f66e64db5 (patch) | |
tree | 7195515c5163ca54bf4771e7040b9cbd8d8e20ba | |
parent | c94ed2a729649f614dc433032b3b3ca189057644 (diff) | |
download | ffmpeg-2a9c50798b798057f82f55bc7564356f66e64db5.tar.gz |
avcodec/huffyuv: dont depend on bitstream_bpp having a specific value for version>2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/huffyuv.c | 2 | ||||
-rw-r--r-- | libavcodec/huffyuvenc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index aca2e92c5b..80b35ed9c8 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -58,7 +58,7 @@ av_cold int ff_huffyuv_alloc_temp(HYuvContext *s) { int i; - if (s->bitstream_bpp<24) { + if (s->bitstream_bpp<24 || s->version > 2) { for (i=0; i<3; i++) { s->temp[i]= av_malloc(2*s->width + 16); if (!s->temp[i]) diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index fd7aa384d6..3cb7293dc1 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -349,7 +349,7 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - if (s->bitstream_bpp >= 24 && s->predictor == MEDIAN) { + if (s->bitstream_bpp >= 24 && s->predictor == MEDIAN && s->version <= 2) { av_log(avctx, AV_LOG_ERROR, "Error: RGB is incompatible with median predictor\n"); return AVERROR(EINVAL); |