OSDN Git Service

ffplay: calculate target clock dynamically, make code more readable
authorMarton Balint <cus@passwd.hu>
Sat, 8 Oct 2011 19:38:53 +0000 (21:38 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 16 Oct 2011 17:21:01 +0000 (19:21 +0200)
commit4e268aae55c483ec6c743f741f17a8a0f9250f1e
treeba8e7e1ed09bf8c683b2a4422a09477abd5fc302
parent6bca574a98ba604459f6ee92538b19d25bba0973
ffplay: calculate target clock dynamically, make code more readable

Since target clock is based on the current A-V delay, it is better calculate it
when we actually need it rather than when we put a picture in the picture
queue.

The patch also makes a code a bit more readable by renaming some delay
variables to duration, and converting compute_target_time to a delay
calculating function which does not modify the state. Factoring out the
iteration of the pictq to standalone function is also done in this patch.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c