[FFmpeg-devel] Seek problem with ffmpeg-mt

Reimar Döffinger Reimar.Doeffinger
Mon Feb 28 18:21:40 CET 2011


On Sun, Feb 27, 2011 at 01:12:47AM -0800, Thomas Worth wrote:
> for(;;){
> 	av_read_frame(formatCtx, &packet);
> 	if(packet.stream_index == videoStream){
> 			
> 		avcodec_decode_video2(codecCtx, frameIn, &frameFinished, &packet);
> 		if(frameFinished){
> 				
> 			fprintf(stderr,"pts:%05d seekpos:%05d\n",packet.pts,seekpos);
> 		}

This is complete nonsense, you are printing the input pts whenever
you get some output.
If you print packet.pts unconditionally before calling decode it
might actually make some sense.
Or printing frameIn->pkt_pts in that condition.



More information about the ffmpeg-devel mailing list