diff options
author | Ian Caulfield <ian.caulfield@gmx.at> | 2005-08-14 01:15:27 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-08-14 01:15:27 +0000 |
commit | bf01fb696defe708fde9ec5d21ebad948f70c877 (patch) | |
tree | ab9f145f9cb3a8bce3ed9fc92d6c4ce5451d2645 /libavcodec/dvbsubdec.c | |
parent | 8341e4e3384aedddd2a515db38b0fbfad95f59bd (diff) | |
download | ffmpeg-bf01fb696defe708fde9ec5d21ebad948f70c877.tar.gz |
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)
Originally committed as revision 4520 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r-- | libavcodec/dvbsubdec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 3309e61f37..5504ac29ff 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1310,10 +1310,8 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, uint8_t *buf, 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 @@ static int dvbsub_decode(AVCodecContext *avctx, return -1; } - return 0; + return buf_size; } |