From 0a6bf29eb93d8ac6ade83071379b20700a7cd06d Mon Sep 17 00:00:00 2001
From: John Koleszar <jkoleszar@google.com>
Date: Fri, 22 Oct 2010 14:57:02 -0400
Subject: [PATCH] vpxenc: warn against webm output to pipes

The WebM writer requires a seekable stream.

Change-Id: I192e00706a0685362d41b8d2faf80add63d564b9
---
 vpxenc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/vpxenc.c b/vpxenc.c
index 4eecdcdf9..a17878217 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -1349,6 +1349,12 @@ int main(int argc, const char **argv_)
             return EXIT_FAILURE;
         }
 
+        if(write_webm && fseek(outfile, 0, SEEK_CUR))
+        {
+            fprintf(stderr, "WebM output to pipes not supported.\n");
+            return EXIT_FAILURE;
+        }
+
         if (stats_fn)
         {
             if (!stats_open_file(&stats, stats_fn, pass))