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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user