acowley / ffmpeg-light

Minimal Haskell bindings to the FFmpeg library
BSD 3-Clause "New" or "Revised" License
67 stars 29 forks source link

imageWriter: only advance frame PTS values for frames after the first one #20

Closed jtdaugherty closed 8 years ago

jtdaugherty commented 8 years ago

This change ensures that video streams produced by imageWriter have a PTS value of zero for the first emitted frame. Previously all frames added to the output stream indiscriminately advanced the PTS value of dstFrame by 'frameTime' but this resulted in always generating videos whose initial frames had a non-zero PTS. This resulted in 1) video players displaying a blank frame rather than the first frame of interest just prior to beginning playback and 2) displaying a blank frame repeatedly during looping playback.

Fixes #18.

acowley commented 8 years ago

Awesome, thank you for identifying the problem and implementing the fix!