H
Harry
Good Day,
Here is a structure that i am using in my code
typedef struct storable_picture
{
PictureStructure structure;
int poc;
int top_poc;
int bottom_poc;
int frame_poc;
int order_num;
int ref_pic_num[6*MAXLISTSIZE];
int frm_ref_pic_num[6*MAXLISTSIZE];
int top_ref_pic_num[6*MAXLISTSIZE];
int bottom_ref_pic_num[6*MAXLISTSIZE];
unsigned frame_num;
int pic_num;
int long_term_pic_num;
int long_term_frame_idx;
int is_long_term;
int used_for_reference;
int is_output;
int non_existing;
int size_x, size_y, size_x_cr, size_y_cr;
int chroma_vector_adjustment;
int coded_frame;
int MbaffFrameFlag;
unsigned short imgY[176*144];
unsigned short imgUV[2*88*72];
unsigned char mb_field[99];
char ref_idx[2*36*44];
int ref_pic_id[6*36*44];
int ref_id[6*36*44];
short mv[2*44*36*2];
unsigned char moving_block[44*36];
unsigned char field_frame[44*36];
struct storable_picture *top_field;
struct storable_picture *bottom_field;
struct storable_picture *frame;
int chroma_format_idc;
int frame_mbs_only_flag;
} StorablePicture;
The above structure is in a header file.In another c file in the
project,i am using the following statements in a function(I have
included the header file where the structure is declared)
StorablePicture *s;
s = calloc (1,sizeof(StorablePicture));
I kept a breakpoint at the second line and when i compile,the compiler
is not reporting an error.when i run the code,an unhandled exception
occurs at the place where memory is allocated for the structure using
calloc.Where is the problem?Help me out.....
Here is a structure that i am using in my code
typedef struct storable_picture
{
PictureStructure structure;
int poc;
int top_poc;
int bottom_poc;
int frame_poc;
int order_num;
int ref_pic_num[6*MAXLISTSIZE];
int frm_ref_pic_num[6*MAXLISTSIZE];
int top_ref_pic_num[6*MAXLISTSIZE];
int bottom_ref_pic_num[6*MAXLISTSIZE];
unsigned frame_num;
int pic_num;
int long_term_pic_num;
int long_term_frame_idx;
int is_long_term;
int used_for_reference;
int is_output;
int non_existing;
int size_x, size_y, size_x_cr, size_y_cr;
int chroma_vector_adjustment;
int coded_frame;
int MbaffFrameFlag;
unsigned short imgY[176*144];
unsigned short imgUV[2*88*72];
unsigned char mb_field[99];
char ref_idx[2*36*44];
int ref_pic_id[6*36*44];
int ref_id[6*36*44];
short mv[2*44*36*2];
unsigned char moving_block[44*36];
unsigned char field_frame[44*36];
struct storable_picture *top_field;
struct storable_picture *bottom_field;
struct storable_picture *frame;
int chroma_format_idc;
int frame_mbs_only_flag;
} StorablePicture;
The above structure is in a header file.In another c file in the
project,i am using the following statements in a function(I have
included the header file where the structure is declared)
StorablePicture *s;
s = calloc (1,sizeof(StorablePicture));
I kept a breakpoint at the second line and when i compile,the compiler
is not reporting an error.when i run the code,an unhandled exception
occurs at the place where memory is allocated for the structure using
calloc.Where is the problem?Help me out.....