Mercurial > libavcodec.hg
diff dvbsubdec.c @ 2833:1f117208d20f libavcodec
subs.diff fixes a couple of minor bugs in my DVB subtitle decoder, and also fixes a few
problems in the DVD decoder (the palette entries were being read
back-to-front, and the timing conversions were slighly off)
patch by (Ian Caulfield: imc25, cam ac uk)
author | michael |
---|---|
date | Sun, 14 Aug 2005 01:15:27 +0000 |
parents | 95c35706acbb |
children | ef2149182f1c |
line wrap: on
line diff
--- a/dvbsubdec.c Sat Aug 13 21:34:24 2005 +0000 +++ b/dvbsubdec.c Sun Aug 14 01:15:27 2005 +0000 @@ -1310,10 +1310,8 @@ sub->num_rects = ctx->display_list_size; - if (sub->num_rects == 0) - return 0; - - sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects); + if (sub->num_rects > 0) + sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects); i = 0; @@ -1447,7 +1445,7 @@ return -1; } - return 0; + return buf_size; }