[vlc-commits] transcode: set output pts in OutputFrame

Ilkka Ollakka git at videolan.org
Fri Jan 31 11:57:42 CET 2014


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jan 31 12:50:50 2014 +0200| [4329e2a4bc329dae91cbac596359c7262e59b80f] | committer: Ilkka Ollakka

transcode: set output pts in OutputFrame

Fixes setting output pts if video filters return multiple
frames in loop but in OutputFrame we don't need to duplicate. Then
we don't set output_pts correctly on following frames, only on first
one.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4329e2a4bc329dae91cbac596359c7262e59b80f
---

 modules/stream_out/transcode/video.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index bc6838d..12c974e 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -722,6 +722,9 @@ static void OutputFrame( sout_stream_sys_t *p_sys, picture_t *p_pic, sout_stream
             subpicture_Delete( p_subpic );
         }
     }
+
+    /* set output pts*/
+    p_pic->date = date_Get( &id->next_output_pts );
     /*This pts is handled, increase clock to next one*/
     date_Increment( &id->next_output_pts, id->p_encoder->fmt_in.video.i_frame_rate_base );
 
@@ -946,8 +949,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
             msg_Dbg( p_stream, "not dropping frame");
 #endif
 
-            /* input calculated pts isn't necessary what pts output should be, so use output pts*/
-            p_pic->date = date_Get( &id->next_output_pts );
         }
 
         /* Run the filter and output chains; first with the picture,



More information about the vlc-commits mailing list