mpegvideo_enc: rework direct mode check

Remove stray semicolon and share codepaths.

CC: libav-stable@libav.org
Bug-Id: CID 991857
mpeg12enc: factor out check in encode_dc

Makes coverity less confused.

CC: libav-stable@libav.org
Bug-Id: CID 751744
ffv1enc: simplify encoder initialization

Also check return value of av_pix_fmt_desc_get.
rtmpproto: remove dead code

Expression already evaluated before, redundant since
053386864219eccbcca1886c55f902f9555428a5.

Bug-Id: CID 732199
mlpdec: check for negative index

CC: libav-stable@libav.org
Bug-Id: CID 970924
lzwenc: check for negative index

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

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