<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send a patch made with "git format-patch" to the FFmpeg development<br>
mailing list.<br>
<br>
Please find out what top-posting means and avoid it on all FFmpeg<br>
mailing lists, Carl Eugen<br></blockquote><div><br></div><div>I don't have any repos set up for ffmpeg maybe you or someone else who does</div><div>could do this very quickly? I wouldn't want to waste anyone's time with bad patches.</div><div>The code, as it fits in the transcoding example is this:</div><div><br></div><div>    av_packet_rescale_ts(&enc_pkt,<br>                         stream_ctx[stream_index].enc_ctx->time_base,<br>                         ofmt_ctx->streams[stream_index]->time_base);<br>    <br>    // Calculate packet duration, using input frame rate as there is no frame rate conversion<br>    if (ifmt_ctx->streams[stream_index]->codecpar->codec_type ==<br>        AVMEDIA_TYPE_VIDEO){<br>        <br>        enc_pkt.duration = ofmt_ctx->streams[stream_index]->time_base.den / ofmt_ctx->streams[stream_index]->time_base.num / ifmt_ctx->streams[stream_index]->avg_frame_rate.num * ifmt_ctx->streams[stream_index]->avg_frame_rate.den;<br>    }<br></div><div><br></div><div>Thanks for your help!</div><div> </div></div></div>