add avcodec_get_subtitle_defaults() to initialize AVSubtitle struct

Call this new function before decode() to replace the custom and
inconsistant initialization in various decoders.
This function is equivalent to avcodec_get_frame_defaults() for AVFrame.

Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
This commit is contained in:
Aurelien Jacobs
2011-04-05 09:04:48 +02:00
parent c104a6e902
commit 3ee8ca9b08
9 changed files with 7 additions and 23 deletions

View File

@@ -173,7 +173,6 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
if (buf_size < 10)
return -1;
memset(sub_header, 0, sizeof(*sub_header));
if (AV_RB16(buf) == 0) { /* HD subpicture with 4-byte offsets */
big_offsets = 1;