[x264-devel] commit: Fix crash if encoder_close is called before delayed frames are flushed ( Steven Walters )
git version control
git at videolan.org
Mon Sep 14 22:00:02 CEST 2009
x264 | branch: master | Steven Walters <kemuri9 at gmail.com> | Wed Sep 9 12:19:40 2009 -0700| [08c83969dd45a6e550aaa3be11c69bb74d7a478c] | committer: Jason Garrett-Glaser
Fix crash if encoder_close is called before delayed frames are flushed
Also no longer flush frames when ctrl-Cing x264, so x264 will close faster.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=08c83969dd45a6e550aaa3be11c69bb74d7a478c
---
encoder/lookahead.c | 2 +-
x264.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/encoder/lookahead.c b/encoder/lookahead.c
index 35ed729..0f64741 100644
--- a/encoder/lookahead.c
+++ b/encoder/lookahead.c
@@ -176,7 +176,7 @@ void x264_lookahead_delete( x264_t *h )
x264_synch_frame_list_delete( &h->lookahead->next );
x264_synch_frame_list_delete( &h->lookahead->ofbuf );
if( h->lookahead->last_nonb )
- x264_frame_delete( h->lookahead->last_nonb );
+ x264_frame_push_unused( h, h->lookahead->last_nonb );
x264_free( h->lookahead );
}
diff --git a/x264.c b/x264.c
index 08095d5..0fdde7d 100644
--- a/x264.c
+++ b/x264.c
@@ -1227,7 +1227,7 @@ static int Encode( x264_param_t *param, cli_opt_t *opt )
}
}
/* Flush delayed frames */
- while( x264_encoder_delayed_frames( h ) )
+ while( !b_ctrl_c && x264_encoder_delayed_frames( h ) )
{
i_frame_size = Encode_frame( h, opt->hout, NULL );
if( i_frame_size < 0 )
More information about the x264-devel
mailing list