summaryrefslogtreecommitdiff
path: root/libavcodec/xsubdec.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2011-04-05 09:04:48 +0200
committerAurelien Jacobs <aurel@gnuage.org>2011-04-11 23:27:50 +0200
commit3ee8ca9b0894df3aaf5086c643283cb58ef9763d (patch)
tree1c2d8e25bdd43f3c791199a74d0db297041147fb /libavcodec/xsubdec.c
parentc104a6e90226eaa253aeba471c8859e0da922da7 (diff)
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>
Diffstat (limited to 'libavcodec/xsubdec.c')
-rw-r--r--libavcodec/xsubdec.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index d24588b8d9..a577ac8f28 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -55,8 +55,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int64_t packet_time = 0;
GetBitContext gb;
- memset(sub, 0, sizeof(*sub));
-
// check that at least header fits
if (buf_size < 27 + 7 * 2 + 4 * 3) {
av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");