demux_disc: handle new_sh_stream() fail correctly

Break the cycle on fail. Old code was checking if sh is NULL after
accessing it's fields.
demux: eliminate redundant check

pkt can't be NULL since it's initialized from ds->head, which is checked
at the beginning.
demux_mkv: eliminate redundant branch

In the else branch pict_type is always 3, so pict_type != 3 is always
false. (Note that I have no idea of what it was supposed to do and it is
just an equivalent of the old behaviour.)
input: handle reaching MP_MAX_FDS correctly

Don't dereference fd and increment ictx->num_fds on fail.
input: make ar_rate and ar_delay fields of input_ctx signed

ar_rate is set to -1 when autorepeat is disabled; there is no reason
for ar_delay to stay unsigned.
vf_softpulldown: handle null mpi_image correctly

Check if mpi is NULL before accessing mpi->fields.
demux_lavf: print a warning if av_read_frame() returns an error

Because why not.