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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/101/merge
Michael Niedermayer 10 years ago
parent c648879827
commit 482761b85a
  1. 5
      libavcodec/snowenc.c

@ -1922,6 +1922,11 @@ int main(void){
s.temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM));
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);
printf("testing 5/3 DWT\n");

Loading…
Cancel
Save