summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-08 00:00:46 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-08 00:32:09 +0200
commitce2217b25eccda9f5c14022bd69792e71b417b73 (patch)
tree7ea358b77eb60739b9ec153bcc74b0408e8ab575 /libavcodec/ffv1.c
parent74314f1f5f9ef69700eb18b85a8260e2754a31ef (diff)
avcodec/ffv1: add AV_PIX_FMT_GBRP16 support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 80a9434eb7..a14dd2aab2 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -144,7 +144,11 @@ av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
fs->sample_buffer = av_malloc_array((fs->width + 6), 3 * MAX_PLANES *
sizeof(*fs->sample_buffer));
- if (!fs->sample_buffer) {
+ fs->sample_buffer32 = av_malloc_array((fs->width + 6), 3 * MAX_PLANES *
+ sizeof(*fs->sample_buffer32));
+ if (!fs->sample_buffer || !fs->sample_buffer32) {
+ av_freep(&fs->sample_buffer);
+ av_freep(&fs->sample_buffer32);
av_freep(&f->slice_context[i]);
goto memfail;
}
@@ -154,6 +158,7 @@ av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f)
memfail:
while(--i >= 0) {
av_freep(&f->slice_context[i]->sample_buffer);
+ av_freep(&f->slice_context[i]->sample_buffer32);
av_freep(&f->slice_context[i]);
}
return AVERROR(ENOMEM);
@@ -224,6 +229,7 @@ av_cold int ff_ffv1_close(AVCodecContext *avctx)
av_freep(&p->vlc_state);
}
av_freep(&fs->sample_buffer);
+ av_freep(&fs->sample_buffer32);
}
av_freep(&avctx->stats_out);