<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I've created a test class with an encoder and decoder. I'm creating the
theora headers and immediately<br>
add them to the decoder. For the first 2 packets th_decode_headerin
returns positive nr,<br>
at the 3rd packet returns TH_EBADHEADER. <br>
Am I aloud to do that? I'm not using ogg_stream_packetin. I just want
to encode a picture, resulting an <br>
ogg_packet, then decode it on the client side...<br>
<br>
ogg_packet op;<br>
th_enc_ctx *td;<br>
th_comment tc,tc1;<br>
th_info theoraInfo,theoraInfo1;<br>
th_setup_info *ts1;<br>
for(;;)<br>
{<br>
int ret = th_encode_flushheader(td,&tc,&op);<br>
<br>
int ret2 =
th_decode_headerin(&theoraInfo1,&tc1,&ts1,&op);<br>
if(0==ret) break;<br>
}<br>
<br>
What am i doing wrong here ?
<pre class="moz-signature" cols="72">Mircea Gliga
</pre>
<br>
<br>
Mircea Gliga wrote:
<blockquote cite="mid:4B0E4BC6.30900@integrasoft.ro" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
<br>
<br>
<pre class="moz-signature" cols="72">Mircea Gliga
</pre>
<br>
<br>
Ralph Giles wrote:
<blockquote
cite="mid:9ec9eb9e0911251430i483ca64va9180be4bbe3318d@mail.gmail.com"
type="cite">
<pre wrap="">2009/11/25 Mircea Gliga <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto:mgliga@integrasoft.ro"><mgliga@integrasoft.ro></a>:
</pre>
<blockquote type="cite">
<pre wrap="">[...] Then I allocate a th_enc_ctx handle and repeatedly call
th_encode_flushheader().
Do I have to save this header packets? Do i have to provide this header
packets to the decoder when I
initialize it? Because the documentation says Parse the header packets by
repeatedly calling
th_decode_headerin().
</pre>
</blockquote>
<pre wrap=""><!---->
Yes, you have to pass the headers into the decoder to configure it to
correctly parse the data packets.
-r
</pre>
</blockquote>
</blockquote>
</body>
</html>