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 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 '038890740014dc33d2e2f04da7cf0a9da821264e'

* commit '038890740014dc33d2e2f04da7cf0a9da821264e':
  mpeg4videodec: move cplx_estimation_* fields from MpegEncContext to Mpeg4DecContext

Conflicts:
	libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mpeg4_update_thread_context: copy the whole mpeg4 specific context instead of variables one by one

This simplifies the code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b1aacd56685cd131f517e0551834a0bbd3f5f809'

* commit 'b1aacd56685cd131f517e0551834a0bbd3f5f809':
  mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '8cebc9eaac8631adb23dd1e46c37ad8474139a07'

* commit '8cebc9eaac8631adb23dd1e46c37ad8474139a07':
  mpeg4videodec: remove a write-only variable from MpegEncContext

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e89247debd5276d57ce4a26516224204f9541af0'

* commit 'e89247debd5276d57ce4a26516224204f9541af0':
  mpeg4videodec: replace MpegEncContext.reduced_res_vop with a local variable

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