diff options
author | oskwon <kos@dev3> | 2014-06-23 07:48:53 (GMT) |
---|---|---|
committer | oskwon <kos@dev3> | 2014-06-23 09:22:58 (GMT) |
commit | a2ed44d6148f2ac7d43c61a5eb878bc987e5d747 (patch) | |
tree | 772eb0592e19e774479ae0f0bc519f33eb65797e /src/main.cpp | |
parent | 6a0ddc61f2981645babeaf3d657ded6b0050ff65 (diff) |
Fix seek bug on file-transcoding.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 3749d06..b8474e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,6 +40,8 @@ int streaming_write(const char *buffer, size_t buffer_len, bool enable_log = fal //---------------------------------------------------------------------- static bool is_terminated = true; +static int source_thread_id, stream_thread_id; +static pthread_t source_thread_handle, stream_thread_handle; //---------------------------------------------------------------------- int main(int argc, char **argv) @@ -54,10 +56,6 @@ int main(int argc, char **argv) signal(SIGINT, signal_handler); HttpHeader header; - - int source_thread_id, stream_thread_id; - pthread_t source_thread_handle, stream_thread_handle; - std::string req = HttpHeader::read_request(); DEBUG("request head :\n%s", req.c_str()); @@ -85,7 +83,7 @@ int main(int argc, char **argv) case HttpHeader::TRANSCODING_FILE: try { std::string uri = UriDecoder().decode(header.page_params["file"].c_str()); - Mpeg *ts = new Mpeg(uri, true); + Mpeg *ts = new Mpeg(uri, false); pmt_pid = ts->pmt_pid; video_pid = ts->video_pid; audio_pid = ts->audio_pid; |