lavf/avio: fix ffurl_alloc error checks

ffurl_alloc doc says it returns >= 0 in case of success.
avio treats non-zero as errors.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavf/http: return error on seeking to negative postion

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavf/http: return error from seek on invalid whence

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavd/avdevice: always free detected devices on error

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Merge remote-tracking branch 'lukaszmluki/master'

* lukaszmluki/master:
  lavd/avdevice: always free detected devices on error
  lavf/http: return error from seek on invalid whence
  lavf/http: return error on seeking to negative postion
  lavf/avio: fix ffurl_alloc error checks

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