diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-07-22 01:41:46 +0400 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-07-22 01:41:46 +0400 |
commit | 8a810ccbba3b4d58ed27251f68ac88a0cb40b227 (patch) | |
tree | 2f1a065b1aa74ab393ba0b9adc00fc709a354a37 | |
parent | b0335fd9571aea1b60ee03b5bffd7904fe4efddf (diff) |
use return value of ff_get_line()
Originally committed as revision 24402 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/assdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/assdec.c b/libavformat/assdec.c index ecc9a07888..ff1009c1ce 100644 --- a/libavformat/assdec.c +++ b/libavformat/assdec.c @@ -74,7 +74,7 @@ static int event_cmp(uint8_t **a, uint8_t **b) 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 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) 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 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap) 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--; } |