summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ogg/ogg.h2
-rw-r--r--src/framing.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/ogg/ogg.h b/include/ogg/ogg.h
index be5cdd3..76f0e34 100644
--- a/include/ogg/ogg.h
+++ b/include/ogg/ogg.h
@@ -147,6 +147,8 @@ extern int ogg_page_serialno(ogg_page *og);
extern long ogg_page_pageno(ogg_page *og);
extern int ogg_page_packets(ogg_page *og);
+extern void ogg_packet_clear(ogg_packet *op);
+
#ifdef __cplusplus
}
diff --git a/src/framing.c b/src/framing.c
index 720bc08..9249d43 100644
--- a/src/framing.c
+++ b/src/framing.c
@@ -13,7 +13,7 @@
function: code raw [Vorbis] packets into framed OggSquish stream and
decode Ogg streams back into raw packets
- last mod: $Id: framing.c,v 1.8 2000/11/13 23:54:59 xiphmont Exp $
+ last mod: $Id: framing.c,v 1.9 2001/01/18 10:54:30 msmith Exp $
note: The CRC code is directly derived from public domain code by
Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html
@@ -815,6 +815,11 @@ int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op){
return(1);
}
+void ogg_packet_clear(ogg_packet *op) {
+ free(op->packet);
+ memset(op, 0, sizeof(ogg_packet));
+}
+
#ifdef _V_SELFTEST
#include <stdio.h>