diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-06 21:37:38 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-07-06 21:37:38 +0000 |
commit | 9f608360463489241291e081f3cb33590024cb09 (patch) | |
tree | 1900e43f3841f175a9a6b53c648518179061b31c | |
parent | a65f9f76bf00834768527a45133461c510022b78 (diff) |
Revert fix v1.3, it breaks streams with cook audio (ex.
rtsp://mm4.rai.it/raitre/blob/ultimo/blob.rm)
Applied a different fix for the first buf[k] (ensure buf size is k+4)
The second buf[k] is safe, buf is at least 32 when the code is called
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15933 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/realrtsp/sdpplin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmpdemux/realrtsp/sdpplin.c b/libmpdemux/realrtsp/sdpplin.c index ae0bee2b44..98b2fe5222 100644 --- a/libmpdemux/realrtsp/sdpplin.c +++ b/libmpdemux/realrtsp/sdpplin.c @@ -80,18 +80,18 @@ static char *b64_decode(const char *in, char *out, int *size) a[i] = (char) c; b[i] = (char) dtable[c]; } - out = xbuffer_ensure_size(out, k+3); + out = xbuffer_ensure_size(out, k+4); out[k++] = (b[0] << 2) | (b[1] >> 4); out[k++] = (b[1] << 4) | (b[2] >> 2); out[k++] = (b[2] << 6) | b[3]; i = a[2] == '=' ? 1 : (a[3] == '=' ? 2 : 3); if (i < 3) { - out[k - 1]=0; + out[k]=0; *size=k; return out; } } - out[k - 1]=0; + out[k]=0; *size=k; return out; } |