summaryrefslogtreecommitdiff
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-28 10:27:40 -0700
committerMartin Storsjö <martin@martin.st>2014-05-28 21:51:38 +0300
commit7dba055bb0d31b2c79d9c3a66abb849a71417d3c (patch)
tree0cd35d2d66645f25b2aef5c4070f8c1b6740e7f1 /libavformat/oggenc.c
parentb5aa48551300eed678aaea86ced7086758598a35 (diff)
downloadffmpeg-7dba055bb0d31b2c79d9c3a66abb849a71417d3c.tar.gz
oggenc: Fix the EOS flag
This corrects the bug that caused the checksums to change in 9767d7c092c890ecc5953452e8a951fd902dd67b. It caused the EOS flag to be set incorrectly; the ogg spec does not allow it to be set in the middle of a logical bitstream. Signed-off-by: Andrew Kelley <superjoe30@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 97aba34a69..c30315a920 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -401,7 +401,7 @@ static void ogg_write_pages(AVFormatContext *s, int flush)
if (oggstream->page_count < 2 && !flush)
break;
ogg_write_page(s, &p->page,
- flush && oggstream->page_count == 1 ? 4 : 0); // eos
+ flush == 1 && oggstream->page_count == 1 ? 4 : 0); // eos
next = p->next;
av_freep(&p);
p = next;
@@ -540,7 +540,7 @@ static int ogg_write_header(AVFormatContext *s)
oggstream->page.start_granule = AV_NOPTS_VALUE;
- ogg_write_pages(s, 1);
+ ogg_write_pages(s, 2);
return 0;
}