Skip to content

Commit

Permalink
Allocate avcc->pps_table using numOfPictureParameterSets instead of n…
Browse files Browse the repository at this point in the history
…umOfSequenceParameterSets
  • Loading branch information
yannlandry committed Jun 20, 2024
1 parent ae72f73 commit 5bfb960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion h264_avcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int read_avcc(avcc_t* avcc, h264_stream_t* h, bs_t* b)
}

avcc->numOfPictureParameterSets = bs_read_u(b, 8);
avcc->pps_table = (pps_t**)calloc(avcc->numOfSequenceParameterSets, sizeof(pps_t*));
avcc->pps_table = (pps_t**)calloc(avcc->numOfPictureParameterSets, sizeof(pps_t*));
for (int i = 0; i < avcc->numOfPictureParameterSets; i++)
{
int pictureParameterSetLength = bs_read_u(b, 16);
Expand Down

0 comments on commit 5bfb960

Please sign in to comment.