]> granicus.if.org Git - handbrake/commitdiff
fixed opencl error
authorhandbrake <no-reply@handbrake.fr>
Fri, 22 Mar 2013 09:16:23 +0000 (09:16 +0000)
committerhandbrake <no-reply@handbrake.fr>
Fri, 22 Mar 2013 09:16:23 +0000 (09:16 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5356 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decavcodec.c

index 5aa2c3912222498c9831aa0d880a398bad076329..3df00006acf6707db987cff788f560903eabeae6 100644 (file)
@@ -927,12 +927,11 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen
                 else
                     frame.pkt_pts = pv->dxva2->input_pts[0]<pv->dxva2->input_pts[1] ? pv->dxva2->input_pts[0] : pv->dxva2->input_pts[1];
             }
-            pts = pv->pts_next;
         }
-#else
+#endif
         // If there was no pts for this frame, assume constant frame rate
         // video & estimate the next frame time from the last & duration.
-        if (frame.pkt_pts == AV_NOPTS_VALUE)
+        if (frame.pkt_pts == AV_NOPTS_VALUE || hb_gui_use_hwd_flag == 1)
         {
             pts = pv->pts_next;
         }
@@ -940,7 +939,7 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen
         {
             pts = frame.pkt_pts;
         }
-#endif
+
         pv->pts_next = pts + frame_dur;
 
         if ( frame.top_field_first )