ffmpeg: do not pass possibly undefined subtitles to sub2video_update

It should not matter for real-life usage, it is just cleaner this way.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
ffmpeg: free empty subtitles as well in transcode_subtitles

Even if it does not matter at the moment, because subtitles with num_rect == 0
have no memory allocated, this is how we expect the users to use the API, a
returned AVSubtitle should be freed with avsubtitle_free.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
ffmpeg: ensure that -fix_sub_duration doesnt create subtitles with zero duration

When fix_sub_duration is used, and the duration fixing code is generating 0
duration, that is definitely zero, and not undefined or infinite (which may be
the case for decoded AVSubtitles depending on the codec), so it is safe to drop
it.

It fixes teletext subtitle sources, when the subtitles are transmitted twice
after each other for some reason.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
mxfdec: set extradata size

The line setting it was mistakenly removed in
ecf442a58b09bdb1dc1d2c3904b82ac5f79b2878
mpeg4videodec: add a mpeg4-specific private context.
mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext
mpeg4videodec: move MpegEncContext.time_increment_bits to Mpeg4DecContext

The field remains in MpegEncContext for use in the encoder.
mpeg4videoenc: write 0 instead of vol_sprite_usage

That field is never set for encoding.
mpeg4videodec: move MpegEncContext.vol_sprite_usage to Mpeg4DecContext
mpeg4videodec: remove write-only sprite variables from MpegEncContext
mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext
h263dec: remove commented out cruft
mpeg4videoenc: don't set MpegEncContext.resync_marker

It is only used in one place immediately after it is set.
vc1: move MpegEncContext.resync_marker into VC1Context.

The field still remains in MpegEncContext because it is used by the
mpeg4 decoder.
mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext.
mpeg4videodec: move mpeg4-specific bug detection from h263 generic code to mpeg4
mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec
mpeg4videodec: move mpeg4-specific bug workaround variables from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move cplx_estimation_* fields from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext