Commit b572a1fd authored by aymeric's avatar aymeric
Browse files

fix enlarging decoder buffer

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@687 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent b29a1267
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment