Changeset 63621a7 in git


Ignore:
Timestamp:
20/09/11 04:52:26 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
7831cef
Parents:
696b35b
Message:

src/moviemaker.cc: Updates towards compatibility with newer FFmpeg
libraries without breaking build with those in Debian stable.

git-svn-id: file:///home/survex-svn/survex/trunk@3668 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r696b35b r63621a7  
     1Tue Sep 20 03:51:40 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * src/moviemaker.cc: Updates towards compatibility with newer FFmpeg
     4          libraries without breaking build with those in Debian stable.
     5
    16Tue Sep 20 03:41:58 GMT 2011  Olly Betts <olly@survex.com>
    27
  • src/moviemaker.cc

    r696b35b r63621a7  
    113113    oc = avformat_alloc_context();
    114114    if (!oc) {
    115         averrno = AVERROR_NOMEM;
     115        averrno = AVERROR(ENOMEM);
    116116        return false;
    117117    }
     
    126126    st = av_new_stream(oc, 0);
    127127    if (!st) {
    128         averrno = AVERROR_NOMEM;
     128        averrno = AVERROR(ENOMEM);
    129129        return false;
    130130    }
     
    178178        outbuf = (unsigned char *)malloc(OUTBUF_SIZE);
    179179        if (!outbuf) {
    180             averrno = AVERROR_NOMEM;
     180            averrno = AVERROR(ENOMEM);
    181181            return false;
    182182        }
     
    185185    frame = avcodec_alloc_frame();
    186186    if (!frame) {
    187         averrno = AVERROR_NOMEM;
     187        averrno = AVERROR(ENOMEM);
    188188        return false;
    189189    }
     
    192192    if (!picture_buf) {
    193193        av_free(frame);
    194         averrno = AVERROR_NOMEM;
     194        averrno = AVERROR(ENOMEM);
    195195        return false;
    196196    }
     
    205205    pixels = (unsigned char *)malloc(width * height * 6);
    206206    if (!pixels) {
    207         averrno = AVERROR_NOMEM;
     207        averrno = AVERROR(ENOMEM);
    208208        return false;
    209209    }
     
    305305        av_init_packet(&pkt);
    306306
    307         if (c->coded_frame->pts != AV_NOPTS_VALUE)
     307        if (c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
    308308            pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
    309309        if (c->coded_frame->key_frame)
     
    336336                av_init_packet(&pkt);
    337337
    338                 if (c->coded_frame->pts != AV_NOPTS_VALUE)
     338                if (c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
    339339                    pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
    340340                if (c->coded_frame->key_frame)
     
    390390#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
    391391    switch (averrno) {
    392         case AVERROR_IO:
     392        case AVERROR(EIO):
    393393            return "I/O error";
    394         case AVERROR_NUMEXPECTED:
     394        case AVERROR(EDOM):
    395395            return "Number syntax expected in filename";
    396396        case AVERROR_INVALIDDATA:
    397397            /* same as AVERROR_UNKNOWN: return "unknown error"; */
    398398            return "invalid data found";
    399         case AVERROR_NOMEM:
     399        case AVERROR(ENOMEM):
    400400            return "not enough memory";
    401         case AVERROR_NOFMT:
     401        case AVERROR(EILSEQ):
    402402            return "unknown format";
    403         case AVERROR_NOTSUPP:
     403        case AVERROR(ENOSYS):
    404404            return "Operation not supported";
    405         case AVERROR_NOENT:
     405        case AVERROR(ENOENT):
    406406            return "No such file or directory";
    407407        case AVERROR_EOF:
Note: See TracChangeset for help on using the changeset viewer.