Commit 482761b8 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/snowenc-test: check for av_malloc*() failures

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c6488798
...@@ -1922,6 +1922,11 @@ int main(void){ ...@@ -1922,6 +1922,11 @@ int main(void){
s.temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM)); s.temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM));
s.temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM)); s.temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM));
if (!s.temp_dwt_buffer || !s.temp_idwt_buffer) {
fprintf(stderr, "Failed to allocate memory\n");
return 1;
}
av_lfg_init(&prng, 1); av_lfg_init(&prng, 1);
printf("testing 5/3 DWT\n"); printf("testing 5/3 DWT\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment