diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-01-25 15:00:07 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-01-25 15:00:07 +0000 |
commit | b16bd9395864c200219abad4a96bde3e04731459 (patch) | |
tree | 9e0466eac9e231c3dcf4434c3b8796dd1dfc2b78 | |
parent | 8fa0064920cfddec9d19c33b9803c73d729fd64e (diff) | |
download | xine-lib-b16bd9395864c200219abad4a96bde3e04731459.tar.gz xine-lib-b16bd9395864c200219abad4a96bde3e04731459.tar.bz2 |
Avoid to send garbage to decoders.
CVS patchset: 4007
CVS date: 2003/01/25 15:00:07
-rw-r--r-- | src/input/mms.c | 5 | ||||
-rw-r--r-- | src/input/mmsh.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/input/mms.c b/src/input/mms.c index 55c02595e..8afb68ac0 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.18 2003/01/15 01:05:24 tmattern Exp $ + * $Id: mms.c,v 1.19 2003/01/25 15:00:07 tmattern Exp $ * * based on work from major mms * utility functions to handle communication with an mms server @@ -1074,7 +1074,8 @@ static int get_media_packet (mms_t *this) { return 0; } - /* implicit padding (with "random" data)*/ + /* explicit padding with 0 */ + memset(this->buf + packet_len, 0, this->packet_length - packet_len); this->buf_size = this->packet_length; } else { diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 6645a08ea..1f909fd5c 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.c,v 1.8 2003/01/16 00:40:48 tmattern Exp $ + * $Id: mmsh.c,v 1.9 2003/01/25 15:00:10 tmattern Exp $ * * based on mms.c and specs from avifile * (http://avifile.sourceforge.net/asf-1.0.htm) @@ -1008,7 +1008,9 @@ static int get_media_packet (mmsh_t *this) { len = read_timeout (this->s, this->buf, this->chunk_length); if (len == this->chunk_length) { - /* implicit padding (with "random" data) */ + /* explicit padding with 0 */ + memset(this->buf + this->chunk_length, 0, + this->packet_length - this->chunk_length); this->buf_size = this->packet_length; return 1; } else { |