avformat/movenc: Check that packet duration is valid in ff_mov_write_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Check end time in avpriv_new_chapter()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mov: Dont blindly trust the stream duration in seting chapter times

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