av_estimate_timings_from_pts() flushes the packet queue but doesn't reset the streams' cur_dts values.  This can lead to a fatal "error, non monotone timestamps ..." message later, because the out-of-date cur_dts values are used to compute some packet's dts.
av_estimate_timings_from_pts() flushes the packet queue but doesn't
reset the streams' cur_dts values.  This can lead to a fatal "error,
non monotone timestamps ..." message later, because the out-of-date
cur_dts values are used to compute some packet's dts.

Fix this by calling av_read_frame_flush() and eliminate code
duplication in the process.

The additional hunk gives more detailed error messages.

patch by Wolfram Gloger, wmglo dent.med.uni-muenchen de


git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@8465 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg