[Jahshaka-cvs] openlibraries/src/openmedialib/plugins/avformat avformat_plugin.cpp, 1.76, 1.77
Status: Beta
Brought to you by:
jahshaka
From: Charles Y. <lil...@us...> - 2007-03-03 18:39:09
|
Update of /cvsroot/openlibraries/openlibraries/src/openmedialib/plugins/avformat In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23566 Modified Files: avformat_plugin.cpp Log Message: + Added some missing ffmpeg assignments Index: avformat_plugin.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/src/openmedialib/plugins/avformat/avformat_plugin.cpp,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- avformat_plugin.cpp 2 Mar 2007 10:04:26 -0000 1.76 +++ avformat_plugin.cpp 3 Mar 2007 18:39:06 -0000 1.77 @@ -548,6 +548,10 @@ if ( oc_->oformat->flags & AVFMT_GLOBALHEADER ) c->flags |= CODEC_FLAG_GLOBAL_HEADER; + oc_->preload= (int)( 0.5 * AV_TIME_BASE ); + oc_->max_delay= (int)( 0.7 * AV_TIME_BASE ); + oc_->loop_output = AVFMT_NOOUTPUTLOOP; + oc_->mux_rate = prop_mux_rate_.value< int >( ); oc_->packet_size = prop_video_packet_size_.value< int >( ); c->rc_max_rate = prop_video_rc_max_rate_.value< int >( ); @@ -563,6 +567,7 @@ c->inter_quant_bias = prop_video_inter_quant_bias_.value< int >( ); c->dct_algo = prop_dct_algo_.value< int >( ); c->idct_algo = prop_idct_algo_.value< int >( ); + c->rc_initial_buffer_occupancy = c->rc_buffer_size*3/4; c->me_threshold = prop_me_threshold_.value< int >( ); c->mb_threshold = prop_mb_threshold_.value< int >( ); c->intra_dc_precision = prop_intra_dc_precision_.value< int >( ); @@ -812,7 +817,7 @@ else { // Set the quality - av_image_.quality = video_stream_->quality; + av_image_.pict_type = 0; // Encode the image int out_size = avcodec_encode_video( c, video_outbuf_, video_outbuf_size_, &av_image_ ); @@ -824,7 +829,7 @@ av_init_packet( &pkt ); if ( c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE ) - pkt.pts= av_rescale_q( c->coded_frame->pts, c->time_base, video_stream_->time_base ); + pkt.pts = av_rescale_q( c->coded_frame->pts, c->time_base, video_stream_->time_base ); if( c->coded_frame && c->coded_frame->key_frame ) pkt.flags |= PKT_FLAG_KEY; pkt.stream_index = video_stream_->index; |