diff --git a/transcoder/transcode/transcode_session.c b/transcoder/transcode/transcode_session.c index a7dce14..5b109c0 100644 --- a/transcoder/transcode/transcode_session.c +++ b/transcoder/transcode/transcode_session.c @@ -416,14 +416,14 @@ int encodeFrame(transcode_session_t *pContext,int encoderId,int outputId,AVFrame goto encoder_error; } + output_frame_id = pContext->transcoded_frame_first_id+pOutput->stats.totalFrames; + add_packet_frame_id_and_pts(pOutPacket,output_frame_id,pOutPacket->pts); + pOutPacket->pos=clock_estimator_get_clock(&pContext->clock_estimator,pOutPacket->dts); + LOGGER(CATEGORY_TRANSCODING_SESSION,AV_LOG_DEBUG,"[%s] received encoded frame %s from encoder Id %d", pOutput->track_id, getPacketDesc(pOutPacket), encoderId); - output_frame_id = pContext->transcoded_frame_first_id+pOutput->stats.totalFrames; - add_packet_frame_id_and_pts(pOutPacket,output_frame_id,pOutPacket->pts); - - pOutPacket->pos=clock_estimator_get_clock(&pContext->clock_estimator,pOutPacket->dts); if(pContext->ack_handler == pOutput){ _S(ackEncode(pEncoder->ctx,&pContext->ack_handler->acker,pOutPacket));