changeset 3020:38777f77320e libavformat

it seems ogg requires granule to be -1 on unfinished packets
author bcoudurier
date Tue, 05 Feb 2008 01:01:56 +0000
parents 46c79fb51125
children 6f393e79e896
files oggenc.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/oggenc.c	Mon Feb 04 12:32:25 2008 +0000
+++ b/oggenc.c	Tue Feb 05 01:01:56 2008 +0000
@@ -51,7 +51,11 @@
     offset_t crc_offset;
     int page_segments, i;
 
-    size = FFMIN(size, 255*255);
+    if (size >= 255*255) {
+        granule = -1;
+        size = 255*255;
+    }
+
     page_segments = FFMIN((size/255)+!!size, 255);
 
     init_checksum(s->pb, ff_crc04C11DB7_update, 0);