avformat: add av_stream_get_end_pts()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: use av_stream_get_end_pts()

Simplifies code and should correct timing values when -*sync drop is used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>