[x264-devel] Fix 10L in r1886
Jason Garrett-Glaser
git at videolan.org
Mon Feb 7 08:13:44 CET 2011
x264 | branch: master | Jason Garrett-Glaser <jason at x264.com> | Sun Feb 6 23:12:09 2011 -0800| [60ef1f8627a26de853980755e35b908cbd5b227d] | committer: Jason Garrett-Glaser
Fix 10L in r1886
Aspect ratio can't be set before SPS is initted.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=60ef1f8627a26de853980755e35b908cbd5b227d
---
encoder/encoder.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 782d34f..68a6fa1 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -949,8 +949,6 @@ x264_t *x264_encoder_open( x264_param_t *param )
if( h->param.rc.psz_stat_in )
h->param.rc.psz_stat_in = strdup( h->param.rc.psz_stat_in );
- x264_set_aspect_ratio( h, &h->param, 1 );
-
x264_reduce_fraction( &h->param.i_fps_num, &h->param.i_fps_den );
x264_reduce_fraction( &h->param.i_timebase_num, &h->param.i_timebase_den );
@@ -971,6 +969,8 @@ x264_t *x264_encoder_open( x264_param_t *param )
h->pps = &h->pps_array[0];
x264_pps_init( h->pps, h->param.i_sps_id, &h->param, h->sps );
+ x264_set_aspect_ratio( h, &h->param, 1 );
+
x264_validate_levels( h, 1 );
h->chroma_qp_table = i_chroma_qp_table + 12 + h->pps->i_chroma_qp_index_offset;
More information about the x264-devel
mailing list