mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec/fuzz/helpers.c: actually committed this file now:
This commit is contained in:
parent
d0f99b581d
commit
b418749be5
|
@ -30,12 +30,18 @@ typedef struct Reader Reader;
|
||||||
|
|
||||||
BitReader* new_BitReader(char* d, int l){
|
BitReader* new_BitReader(char* d, int l){
|
||||||
Reader* r = (Reader*)malloc(sizeof(Reader));
|
Reader* r = (Reader*)malloc(sizeof(Reader));
|
||||||
|
if(!r){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
r->data = d;
|
r->data = d;
|
||||||
r->curr = 0;
|
r->curr = 0;
|
||||||
r->len = l;
|
r->len = l;
|
||||||
r->err = 0;
|
r->err = 0;
|
||||||
|
|
||||||
BitReader* br = (BitReader*)malloc(sizeof(BitReader));
|
BitReader* br = (BitReader*)malloc(sizeof(BitReader));
|
||||||
|
if(!br){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
br->r = r;
|
br->r = r;
|
||||||
br->n = 0;
|
br->n = 0;
|
||||||
br->bits = 0;
|
br->bits = 0;
|
||||||
|
|
Loading…
Reference in New Issue