[FFmpeg-devel] [PATCH 2/4] mov: fix tref count for multiple trefs
Jean First
jeanfirst at gmail.com
Sat Aug 25 11:44:12 CEST 2012
Signed-off-by: Jean First <jeanfirst at gmail.com>
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index cb8307f..e128e51 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2521,7 +2521,7 @@ static int mov_read_tref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (size < 12)
return 0;
- sc->trefs_count = (size - 4) / 8;
+ sc->trefs_count = (size + 4) / 8;
sc->trefs = av_malloc(sc->trefs_count * sizeof(*sc->trefs));
if (!sc->trefs)
return AVERROR(ENOMEM);
--
1.7.9.4
More information about the ffmpeg-devel
mailing list