aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-10 15:38:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-17 21:50:06 +0200
commit404db2b99eca0e71cc8026839c6e1fc43f2c86e3 (patch)
tree5ca95a2cf1c64eb60bffcfaa9a2666c697c92615
parent17ad9778a9a3da3f7c314c31ba9bc78b5ede8c4f (diff)
downloadffmpeg-404db2b99eca0e71cc8026839c6e1fc43f2c86e3.tar.gz
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 a633928d47057426a9c328da594407d1c7da8a5c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/subtitles.c4
-rw-r--r--libavformat/subtitles.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
index fce2bf190b..b7795d8104 100644
--- a/libavformat/subtitles.c
+++ b/libavformat/subtitles.c
@@ -24,7 +24,7 @@
#include "libavutil/avstring.h"
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;
@@ -218,7 +218,7 @@ int ff_smil_extract_next_chunk(AVIOContext *pb, AVBPrint *buf, char *c)
const char *ff_smil_get_attr_ptr(const char *s, const char *attr)
{
int in_quotes = 0;
- const int len = strlen(attr);
+ const size_t len = strlen(attr);
while (*s) {
while (*s) {
diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h
index b5a96ec08c..5ed23d0fb9 100644
--- a/libavformat/subtitles.h
+++ b/libavformat/subtitles.h
@@ -47,7 +47,7 @@ typedef struct {
* previous one instead of adding a new entry, 0 otherwise
*/
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.