diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-02-05 01:01:56 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-02-05 01:01:56 +0000 |
commit | 2dd3c9e0fa203f8dc423e0fc89cc2fcdebc58542 (patch) | |
tree | 3e85f0383660d3438cfc63a2074e901e4f532d39 | |
parent | 9a7871f77dbfe0a3e6c79d2b0ba1142e53ab135e (diff) | |
download | ffmpeg-2dd3c9e0fa203f8dc423e0fc89cc2fcdebc58542.tar.gz |
it seems ogg requires granule to be -1 on unfinished packets
Originally committed as revision 11866 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/oggenc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 1c85073572..e9aaf5a3a4 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -51,7 +51,11 @@ static int ogg_write_page(AVFormatContext *s, const uint8_t *data, int size, 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); |