avcodec/snowenc-test: check for av_malloc*() failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c648879827
commit
482761b85a
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user