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>
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
mpeg4videodec: remove a write-only variable from MpegEncContext
mpeg4videodec: replace MpegEncContext.reduced_res_vop with a local variable
mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext
mpeg4videodec: remove a write-only variable from MpegEncContext
mpeg4videodec: move enhancement_type from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move sprite_brightness_change from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move num_sprite_warping_points from MpegEncContext to Mpeg4DecContext
mpeg4videodec: move sprite_{shift,traj} from MpegEncContext to Mpeg4DecContext
go2meeting: disallow tile dimensions that are not multiple of 16

Original decoder seems to always use 176x128 tiles anyway and this helps
avoiding lots of issues with odd tile sizes in fuzzed files.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merge commit 'b452d5ae866942cec00aa1432fe29498b38b49fc'

* commit 'b452d5ae866942cec00aa1432fe29498b38b49fc':
  mpeg4videodec: move mpeg4-specific bug detection from h263 generic code to mpeg4

Conflicts:
	libavcodec/h263dec.c

not merged, the header decode function is not the right place
See: 6c9b82b6a0d5cbdf90dcbf9f4e1c77ae82c5698f

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h263dec: move call to ff_mpeg4_workaround_bugs() under codec_id check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>