avformat/subtitles: Use size_t for len

string length could theoretically be larger than int

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a633928d47)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2015-05-10 15:38:40 +02:00
parent b2d31dcf04
commit e3d9bf1151
2 changed files with 3 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ int ff_text_peek_r8(FFTextReader *r)
} }
AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q, AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
const uint8_t *event, int len, int merge) const uint8_t *event, size_t len, int merge)
{ {
AVPacket *subs, *sub; AVPacket *subs, *sub;
@@ -303,7 +303,7 @@ int ff_smil_extract_next_text_chunk(FFTextReader *tr, AVBPrint *buf, char *c)
const char *ff_smil_get_attr_ptr(const char *s, const char *attr) const char *ff_smil_get_attr_ptr(const char *s, const char *attr)
{ {
int in_quotes = 0; int in_quotes = 0;
const int len = strlen(attr); const size_t len = strlen(attr);
while (*s) { while (*s) {
while (*s) { while (*s) {

View File

@@ -116,7 +116,7 @@ typedef struct {
* previous one instead of adding a new entry, 0 otherwise * previous one instead of adding a new entry, 0 otherwise
*/ */
AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q, AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
const uint8_t *event, int len, int merge); const uint8_t *event, size_t len, int merge);
/** /**
* Set missing durations and sort subtitles by PTS, and then byte position. * Set missing durations and sort subtitles by PTS, and then byte position.