summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin@xiph.org>2010-06-01 20:20:25 +0000
committerRobin Watts <robin@xiph.org>2010-06-01 20:20:25 +0000
commit1126d09df31732005ce104f95964caaa936c27e1 (patch)
tree26996435d46649d131c2d37485355189a0c1d824
parent05f93f9b459f4e9fa67e226c76a62c8a41516ea7 (diff)
downloadtremor-1126d09df31732005ce104f95964caaa936c27e1.tar.gz
Add framing.c fix from Stuart Fisher. Don't link ogg_page's with no body
into the stream chain. git-svn-id: https://svn.xiph.org/branches/lowmem-branch/Tremolo@17264 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--framing.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/framing.c b/framing.c
index e8ebed7..40cd4c0 100644
--- a/framing.c
+++ b/framing.c
@@ -988,11 +988,13 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
}
/* add to fifos */
- if(!os->body_tail){
- os->body_tail=og->body;
- os->body_head=ogg_buffer_walk(og->body);
- }else{
- os->body_head=ogg_buffer_cat(os->body_head,og->body);
+ if(og->body){
+ if(!os->body_tail){
+ os->body_tail=og->body;
+ os->body_head=ogg_buffer_walk(og->body);
+ }else{
+ os->body_head=ogg_buffer_cat(os->body_head,og->body);
+ }
}
if(!os->header_tail){
os->header_tail=og->header;