Something leads me to believe there is something horribly broken with said fix.<br><a href="http://img12.imageshack.us/img12/7503/brokenp.png">http://img12.imageshack.us/img12/7503/brokenp.png</a><br><br>I've done non-threaded-slicetype encodes on the same video and the bframes should be > pframes.<br>
So something went borked.<br><br><div class="gmail_quote">On Wed, Apr 15, 2009 at 4:34 PM, Steven Walters <span dir="ltr"><<a href="mailto:kemuri9@gmail.com">kemuri9@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've had some more time to try and nail this down and applying the<br>
following diff on top of the v14 patch i no longer get any seg faults:<br>
<br>
diff --git a/encoder/slicetype.c b/encoder/slicetype.c<br>
index f795d4c..a2d62cd 100644<br>
--- a/encoder/slicetype.c<br>
+++ b/encoder/slicetype.c<br>
@@ -364,8 +364,8 @@ static int x264_slicetype_path_cost( x264_t *h,<br>
x264_mb_analysis_t *a, x264_fram<br>
/* Find the location of the next P-frame. */<br>
while( path[next_p] && path[next_p] != 'P' )<br>
next_p++;<br>
- /* Return if the path doesn't end on a P-frame. */<br>
- if( path[next_p] != 'P' )<br>
+ /* Return if the path doesn't end on a P-frame or reaches max length */<br>
+ if( path[next_p] != 'P' || next_p > MAX_LENGTH )<br>
return cost;<br>
<br>
/* Add the cost of the P-frame found above */<br>
@@ -422,7 +422,7 @@ static void x264_slicetype_path( x264_t *h,<br>
x264_mb_analysis_t *a, x264_frame_t<br>
<br>
static int x264_slicetype_path_search( x264_t *h, x264_mb_analysis_t<br>
*a, x264_frame_t **frames, int length, int bframes, int buffer )<br>
{<br>
- char best_paths[MAX_LENGTH][MAX_LENGTH] = {"","P"};<br>
+ char best_paths[MAX_LENGTH+1][MAX_LENGTH] = {"","P"};<br>
int n;<br>
for( n = 2; n < length-1; n++ )<br>
x264_slicetype_path( h, a, frames, n, bframes, buffer, best_paths );<br>
<br>
this should probably be confirmed as being correct.<br>
<div><div></div><div class="h5">_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</div></div></blockquote></div><br>