lavr: add a function for checking whether AVAudioResampleContext is open
lavr: return an error if a avresample_open() is called on an open context
Merge commit '7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731'

* commit '7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731':
  lavr: add a function for checking whether AVAudioResampleContext is open

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavr: return an error if a avresample_open() is called on an open context

Merged-by: Michael Niedermayer <michaelni@gmx.at>
swresample: factorize clear_context() out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mux: support shifting timestamps so they start at 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/movenc: shift positive timestamps to 0 if edit lists cannot be used

Fix handling of timestamps which start  far away from 0

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