<div>Last issue is fixed, i was breaking index table by not specifying which frame is key after encoding.</div><span style="color:rgb(192,192,192)"> </span><font face="arial, helvetica, sans-serif" style="color:rgb(192,192,192)"></font><div>
<br></div>these four lines fix everything:<div><br><span style="font-family:arial,helvetica,sans-serif;color:rgb(128,128,0)">if</span><span style="font-family:arial,helvetica,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:arial,helvetica,sans-serif">(</span><span style="font-family:arial,helvetica,sans-serif">outputStream</span><span style="font-family:arial,helvetica,sans-serif">-></span><span style="font-family:arial,helvetica,sans-serif;color:rgb(128,0,0)">codec</span><span style="font-family:arial,helvetica,sans-serif">-></span><span style="font-family:arial,helvetica,sans-serif;color:rgb(128,0,0)">coded_frame</span><span style="font-family:arial,helvetica,sans-serif">-></span><span style="font-family:arial,helvetica,sans-serif;color:rgb(128,0,0)">key_frame</span><span style="font-family:arial,helvetica,sans-serif">)</span><br>
<span style="color:rgb(192,192,192);font-family:arial,helvetica,sans-serif"></span> packet.<span style="color:rgb(128,0,0)">flags</span><span style="color:rgb(192,192,192)"> </span>|=<span style="color:rgb(192,192,192)"> </span>AV_PKT_FLAG_KEY;<br>
<span style="color:rgb(128,128,0)">else</span><br><span style="color:rgb(192,192,192);font-family:arial,helvetica,sans-serif"></span> packet.<span style="color:#800000">flags</span><span style="color:#c0c0c0"> </span>^=<span style="color:#c0c0c0"> </span>AV_PKT_FLAG_KEY;</div>
<div><br><div>Now issue with flipping left, does anybody have any ideas about it? :)</div><div> </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Looks loke i broke index table during transcoding. How can i fix it?</blockquote><div>... </div><div style> </div><blockquote class="gmail_quote" style>Hello again!<br><blockquote>The issue is that i can't perform avformat_seek_file on video that i have transcoded before(with my application).<br>
I've tracked down the cause of the error and it is ff_index_search_timestamp which returns -1. I have no idea what is stream index(except stream index in AVFormatContext) and why it can be -1. I guess that i'm doing transcoding wrong or i just don't store some valuable information into new AVFormatContext before closing it. Any ideas what could it be?<br>
And another question,<br>I have one video that flips horizontally after i copy some of it's frames to another AVFormatContext. How can i avoid that? Where is the information about flipping stored? I tried to determine codec manually and change priv_data manually by using corresponding struct, but that was of no help. <br>
all code is here <a href="http://www.pasteall.org/33080/cpp" target="_blank" style="color:rgb(17,85,204)">http://www.pasteall.org/33080/cpp<br></a>I think, main parts in this issue are methods openOutput and cutVideo. <br>
Any help would be much appreciated!<br>best regards,<br>gavlig</blockquote></blockquote>
</div>