Skip to content

Commit 7e70cad

Browse files
author
Clement Champetier
committed
OutpuVideo: clean encodeFrame
1 parent fc40472 commit 7e70cad

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/AvTranscoder/EssenceStream/OutputVideo.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,7 @@ bool OutputVideo::encodeFrame( const Frame& sourceFrame, DataStream& codedFrame
8080
if( ( codecContext->coded_frame ) &&
8181
( codecContext->coded_frame->pts != (int)AV_NOPTS_VALUE ) )
8282
{
83-
// why need to do that ?
84-
//packet.pts = av_rescale_q( codecContext->coded_frame->pts, codecContext->time_base, codecContext->time_base );
85-
86-
//std::cout << "pts with rescale " << (int)packet.pts << std::endl;
8783
packet.pts = codecContext->coded_frame->pts;
88-
//std::cout << "pts without rescale " << (int)packet.pts << std::endl;
8984
}
9085

9186
if( codecContext->coded_frame &&
@@ -94,7 +89,6 @@ bool OutputVideo::encodeFrame( const Frame& sourceFrame, DataStream& codedFrame
9489
packet.flags |= AV_PKT_FLAG_KEY;
9590
}
9691

97-
9892
#if LIBAVCODEC_VERSION_MAJOR > 53
9993
int gotPacket = 0;
10094
int ret = avcodec_encode_video2( codecContext, &packet, frame, &gotPacket );
@@ -145,7 +139,6 @@ bool OutputVideo::encodeFrame( const Frame& sourceFrame, DataStream& codedFrame
145139
return ret == 0;
146140
}
147141

148-
149142
bool OutputVideo::encodeFrame( DataStream& codedFrame )
150143
{
151144
AVCodecContext* codecContext = _videoDesc.getCodecContext();

0 commit comments

Comments
 (0)