c->codec_type = AVMEDIA_TYPE_VIDEO;
c->width = output_format_.width;
c->height = output_format_.height - output_format_.croptop - output_format_.cropbot;
- st->time_base.den = format_desc_.time_scale;
- st->time_base.num = format_desc_.duration;
+ c->time_base.den = format_desc_.time_scale;
+ c->time_base.num = format_desc_.duration;
c->gop_size = 25;
c->flags |= format_desc_.field_mode == core::field_mode::progressive ? 0 : (CODEC_FLAG_INTERLACED_ME | CODEC_FLAG_INTERLACED_DCT);
c->pix_fmt = c->pix_fmt != PIX_FMT_NONE ? c->pix_fmt : PIX_FMT_YUV420P;
c->sample_rate = 48000;
c->channels = 2;
c->sample_fmt = AV_SAMPLE_FMT_S16;
- st->time_base.num = 1;
- st->time_base.den = c->sample_rate;
+ c->time_base.num = 1;
+ c->time_base.den = c->sample_rate;
if(output_format_.vcodec == CODEC_ID_FLV1)
c->sample_rate = 44100;
{
case AVMEDIA_TYPE_VIDEO:
{
- st->time_base = video_graph_out_->inputs[0]->time_base;
+ enc->time_base = video_graph_out_->inputs[0]->time_base;
enc->pix_fmt = static_cast<AVPixelFormat>(video_graph_out_->inputs[0]->format);
enc->sample_aspect_ratio = st->sample_aspect_ratio = video_graph_out_->inputs[0]->sample_aspect_ratio;
enc->width = video_graph_out_->inputs[0]->w;
}
case AVMEDIA_TYPE_AUDIO:
{
- st->time_base = audio_graph_out_->inputs[0]->time_base;
+ enc->time_base = audio_graph_out_->inputs[0]->time_base;
enc->sample_fmt = static_cast<AVSampleFormat>(audio_graph_out_->inputs[0]->format);
enc->sample_rate = audio_graph_out_->inputs[0]->sample_rate;
enc->channel_layout = audio_graph_out_->inputs[0]->channel_layout;
if(!got_packet || pkt.size <= 0)
return false;
-
+
pkt.stream_index = st.index;
if(bsfc)