[FFmpeg-trac] #17(FFmpeg:new): FFPlay set different pts from ffmpeg for AVFilterBufferRef

FFmpeg trac at avcodec.org
Thu Mar 24 10:31:37 CET 2011


#17: FFPlay set different pts from ffmpeg for AVFilterBufferRef
-----------------------+---------------------
  Reporter:  chinshou  |      Owner:  michael
      Type:  defect    |     Status:  new
  Priority:  normal    |  Component:  FFmpeg
   Version:            |   Keywords:
Blocked By:            |   Blocking:
Reproduced:  0         |   Analyzed:  0
-----------------------+---------------------
 Sorry I did not used the latest FFmpeg.

 I found this problem with  version 26383 get from ffmpeg on windows
 autobuild site.

 ffplay set the pts for AVFilterBufferRef struct with output from
 guess_correct_pts function which is very small for example 67, 133 ,etc
 for the first several frames.

 But ffmpeg will set the pts for AVFilterBufferRef with very large rescaled
 value which is calculated by output_packet function's function following
 process.

     if(pkt->pts != AV_NOPTS_VALUE)
         pkt_pts = av_rescale_q(pkt->pts, ist->st->time_base,
 AV_TIME_BASE_Q);


 I added the log output code to vf_rotate's end_frame function like below.

 static void end_frame(AVFilterLink *link)
 {
     RotContext *rot = link->dst->priv;
     AVFilterBufferRef *in  = link->cur_buf;
     AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
     int i, j, plane;

 #if 1

   av_log(0, AV_LOG_ERROR, "rotate pts:%I64d\n", in->pts );

 #endif
   ...
 }

 and used the command

 ffmpeg -i 1.avi -vf "rotate" 2.avi
 ffplay -vf "rotate" 1.avi

 confirmed the problem

 best regards
 ChinShou

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/17>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list