Revision 773947ba libavformat/aviobuf.c
libavformat/aviobuf.c | ||
---|---|---|
675 | 675 |
return val; |
676 | 676 |
} |
677 | 677 |
|
678 |
#if FF_API_OLD_AVIO |
|
678 | 679 |
char *get_strz(AVIOContext *s, char *buf, int maxlen) |
679 | 680 |
{ |
680 |
int i = 0; |
|
681 |
char c; |
|
682 |
|
|
683 |
while ((c = avio_r8(s))) { |
|
684 |
if (i < maxlen-1) |
|
685 |
buf[i++] = c; |
|
686 |
} |
|
687 |
|
|
688 |
buf[i] = 0; /* Ensure null terminated, but may be truncated */ |
|
689 |
|
|
681 |
avio_get_str(s, INT_MAX, buf, maxlen); |
|
690 | 682 |
return buf; |
691 | 683 |
} |
684 |
#endif |
|
692 | 685 |
|
693 | 686 |
int ff_get_line(AVIOContext *s, char *buf, int maxlen) |
694 | 687 |
{ |
Also available in: Unified diff