]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mov.c
avformat/matroskadec: Fix rounding error with codec_delay
[ffmpeg] / libavformat / mov.c
index 47af98cead7113642d4b66f87129ab8d62857b23..57a03543cc63f9e4a1b98c7547f72f495fe469db 100644 (file)
@@ -1473,9 +1473,11 @@ static int mov_read_ares(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         if (par->codec_tag == MKTAG('A', 'V', 'i', 'n') &&
             par->codec_id == AV_CODEC_ID_H264 &&
             atom.size > 11) {
+            int cid;
             avio_skip(pb, 10);
+            cid = avio_rb16(pb);
             /* For AVID AVCI50, force width of 1440 to be able to select the correct SPS and PPS */
-            if (avio_rb16(pb) == 0xd4d)
+            if (cid == 0xd4d || cid == 0xd4e)
                 par->width = 1440;
             return 0;
         } else if (par->codec_tag == MKTAG('A', 'V', 'd', '1') &&
@@ -4235,7 +4237,7 @@ static int mov_seek_auxiliary_info(AVFormatContext *s, MOVStreamContext *sc)
     int i;
 
     if (sc->cenc.auxiliary_info_default_size) {
-        auxiliary_info_seek_offset = sc->cenc.auxiliary_info_default_size * sc->current_sample;
+        auxiliary_info_seek_offset = (size_t)sc->cenc.auxiliary_info_default_size * sc->current_sample;
     } else if (sc->cenc.auxiliary_info_sizes) {
         if (sc->current_sample > sc->cenc.auxiliary_info_sizes_count) {
             av_log(s, AV_LOG_ERROR, "current sample %d greater than the number of auxiliary info sample sizes %"SIZE_SPECIFIER"\n",