mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix enlarging decoder buffer
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@687 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
b29a1267d3
commit
b572a1fd97
1 changed files with 3 additions and 3 deletions
|
|
@ -420,8 +420,8 @@ static bool_t check_sps_pps_change(DecData *d, mblk_t *sps, mblk_t *pps){
|
|||
return ret1 || ret2;
|
||||
}
|
||||
|
||||
static void enlarge_bitstream(DecData *d){
|
||||
d->bitstream_size*=2;
|
||||
static void enlarge_bitstream(DecData *d, int new_size){
|
||||
d->bitstream_size=new_size;
|
||||
d->bitstream=ms_realloc(d->bitstream,d->bitstream_size);
|
||||
}
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ static int nalusToFrame(DecData *d, MSQueue *naluq, bool_t *new_sps_pps){
|
|||
nal_len=im->b_wptr-src;
|
||||
if (dst+nal_len+100>end){
|
||||
int pos=dst-d->bitstream;
|
||||
enlarge_bitstream(d);
|
||||
enlarge_bitstream(d, d->bitstream_size+nal_len+100);
|
||||
dst=d->bitstream+pos;
|
||||
end=d->bitstream+d->bitstream_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue