~ubuntu-branches/ubuntu/utopic/libav/utopic

« back to all changes in this revision

Viewing changes to libavformat/avienc.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.3.42 sid)
  • Revision ID: package-import@ubuntu.com-20140511122845-zxdom35pimot5eat
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
533
533
    }
534
534
 
535
535
    if (s->pb->seekable) {
 
536
        int err;
536
537
        AVIIndex* idx = &avist->indexes;
537
538
        int cl = idx->entry / AVI_INDEX_CLUSTER_SIZE;
538
539
        int id = idx->entry % AVI_INDEX_CLUSTER_SIZE;
539
540
        if (idx->ents_allocated <= idx->entry) {
540
 
            idx->cluster = av_realloc(idx->cluster, (cl+1)*sizeof(void*));
541
 
            if (!idx->cluster)
542
 
                return -1;
 
541
            if ((err = av_reallocp(&idx->cluster, (cl + 1) * sizeof(*idx->cluster))) < 0) {
 
542
                idx->ents_allocated = 0;
 
543
                idx->entry = 0;
 
544
                return err;
 
545
            }
543
546
            idx->cluster[cl] = av_malloc(AVI_INDEX_CLUSTER_SIZE*sizeof(AVIIentry));
544
547
            if (!idx->cluster[cl])
545
548
                return -1;
558
561
    if (size & 1)
559
562
        avio_w8(pb, 0);
560
563
 
561
 
    avio_flush(pb);
562
564
    return 0;
563
565
}
564
566
 
630
632
    .codec_tag         = (const AVCodecTag* const []){
631
633
        ff_codec_bmp_tags, ff_codec_wav_tags, 0
632
634
    },
633
 
    .flags             = AVFMT_VARIABLE_FPS,
634
635
};