avresample: prevent possible division by zero

CC: libav-stable@libav.org
Bug-Id: CID 1231986
avplay: Always free find_stream_info options

CC: libav-stable@libav.org
Bug-Id: CID 1238794
avplay: Always free opts

CC: libav-stable@libav.org
Bug-Id: CID 733793
avprobe: Avoid a possible NULL dereference

CC: libav-stable@libav.org
Bug-Id: CID 1087082
avprobe: Remove a pointless check

The element is always valid.

CC: libav-stable@libav.org
Bug-Id: CID 732276
avconv: fix leak in filter error

CC: libav-stable@libav.org
Bug-Id: CID 1005311
avconv: avoid a null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 739877
avconv: avoid a possible null pointer dereference

Triggered by the goto handle_eof call.

CC: libav-stable@libav.org
Bug-Id: CID 1238803
avconv: avoid null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 1087081
avconv: check return value

CC: libav-stable@libav.org
Bug-Id: CID 1224275
pthreads_frame: Do not leak on failure path

CC: libav-stable@libav.org
Bug-Id: CID 1135767
avio: fix sizeof argument

CC: libav-stable@libav.org
Bug-Id: CID 732284
aviobuf: check context before using it

Avoid a possible null pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CID 1135769
vf_format: avoid null pointer dereference

CC: libav-stable@libav.org
Bug-Id: CID 1224280
vf_showinfo: check negative index

CC: libav-stable@libav.org
Bug-Id: CID 1087086
af_resample: check av_opt_set_dict return value

CC: libav-stable@libav.org
Bug-Id: CID 1087076
h264_cabac: K&R formatting cosmetics

Also reorder headers and slighlty rephrase minor comments.

Bug-Id: CID 1087088
nutdec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 733713
nutenc: check for negative index rather than assert

CC: libav-stable@libav.org
Bug-Id: CID 703721
matroska: fix leak on error

CC: libav-stable@libav.org
Bug-Id: CID 1026767