av_read_frame expects 0 to be returned on end-of-file, and negative
values are reserved for fatal stream-errors. The previous
implementation would return -1 upon EOF (vlc_stream_Read returning 0),
causing premature EOF from modules/demux/avformat/demux.c:Demux.
These changes make sure that we honor the contract associated with the
read-callback, and that we only return -1 if there is a fatal error.
Signed-off-by: Rémi Denis-Courmont <email@example.com>