aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-16 00:08:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-16 00:12:24 +0200
commit13eed267f8c140ca3d69a7a716b917ec7dd77d97 (patch)
treec126ec2288a2680a698be06658a3033a3bb95593 /libavformat/mov.c
parent38b701a3492446d7601336c4938fed2b822aa163 (diff)
parent31931520df35a6f9606fe8293c8a39e2d1fabedf (diff)
downloadffmpeg-13eed267f8c140ca3d69a7a716b917ec7dd77d97.tar.gz
Merge commit '31931520df35a6f9606fe8293c8a39e2d1fabedf'
* commit '31931520df35a6f9606fe8293c8a39e2d1fabedf': mov: Do not allow updating the time scale after it has been set Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c23e5ec1b4..cdc00eb511 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -836,6 +836,11 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
+ if (sc->time_scale) {
+ av_log(c->fc, AV_LOG_ERROR, "Multiple mdhd?\n");
+ return AVERROR_INVALIDDATA;
+ }
+
version = avio_r8(pb);
if (version > 1) {
avpriv_request_sample(c->fc, "Version %d", version);