[FFmpeg-cvslog] avformat/oggenc: fix EOS flag

Michael Niedermayer git at videolan.org
Wed May 28 01:40:22 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 28 01:06:26 2014 +0200| [919c320f7226bf873a9148e1db8994745f9d425d] | committer: Michael Niedermayer

avformat/oggenc: fix EOS flag

This corrects the bug that caused the checksums to change in
9767d7c092c890ecc5953452e8a951fd902dd67b

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=919c320f7226bf873a9148e1db8994745f9d425d
---

 libavformat/oggenc.c        |    4 ++--
 tests/ref/lavf-fate/ogg_vp3 |    2 +-
 tests/ref/lavf/ogg          |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 9ce3169..9f75538 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -406,7 +406,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;
@@ -550,7 +550,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;
 }
diff --git a/tests/ref/lavf-fate/ogg_vp3 b/tests/ref/lavf-fate/ogg_vp3
index d3a6533..9e9cc7e 100644
--- a/tests/ref/lavf-fate/ogg_vp3
+++ b/tests/ref/lavf-fate/ogg_vp3
@@ -1,3 +1,3 @@
-5eff938810d2cc166dfbbd6bba5e710c *./tests/data/lavf-fate/lavf.ogg
+4bd51dac3194fa88ae33767c25b4b1e6 *./tests/data/lavf-fate/lavf.ogg
 417621 ./tests/data/lavf-fate/lavf.ogg
 ./tests/data/lavf-fate/lavf.ogg CRC=0x037e3e79
diff --git a/tests/ref/lavf/ogg b/tests/ref/lavf/ogg
index 7ac7d0e..a08fb5e 100644
--- a/tests/ref/lavf/ogg
+++ b/tests/ref/lavf/ogg
@@ -1,3 +1,3 @@
-7802375589f2584d182d632c870951bc *./tests/data/lavf/lavf.ogg
+81b9366cacb23644c2803585dced9996 *./tests/data/lavf/lavf.ogg
 13516 ./tests/data/lavf/lavf.ogg
 ./tests/data/lavf/lavf.ogg CRC=0x3a1da17e



More information about the ffmpeg-cvslog mailing list