Mercurial > libavformat.hg
changeset 6303:af30d878f7d7 libavformat
use return value of ff_get_line()
author | aurel |
---|---|
date | Wed, 21 Jul 2010 21:41:46 +0000 |
parents | 869753e625c4 |
children | 50b1c5de4b71 |
files | assdec.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/assdec.c Wed Jul 21 21:40:50 2010 +0000 +++ b/assdec.c Wed Jul 21 21:41:46 2010 +0000 @@ -74,7 +74,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) { - int i, header_remaining; + int i, len, header_remaining; ASSContext *ass = s->priv_data; ByteIOContext *pb = s->pb; AVStream *st; @@ -95,7 +95,7 @@ while(!url_feof(pb)){ uint8_t line[MAX_LINESIZE]; - ff_get_line(pb, line, sizeof(line)); + len = ff_get_line(pb, line, sizeof(line)); if(!memcmp(line, "[Events]", 8)) header_remaining= 2; @@ -111,8 +111,8 @@ if(!p) goto fail; *(dst[i])= p; - memcpy(p + pos[i], line, strlen(line)+1); - pos[i] += strlen(line); + memcpy(p + pos[i], line, len+1); + pos[i] += len; if(i) ass->event_count++; else header_remaining--; }