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

« back to all changes in this revision

Viewing changes to libavformat/audiointerleave.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler, Reinhard Tartler, Rico Tzschichholz
  • Date: 2014-08-30 11:02:45 UTC
  • mfrom: (1.3.47 sid)
  • Revision ID: package-import@ubuntu.com-20140830110245-io3dg7q85wfr7125
Tags: 6:11~beta1-2
[ Reinhard Tartler ]
* Make libavcodec-dev depend on libavresample-dev

[ Rico Tzschichholz ]
* Some fixes and leftovers from soname bumps

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
                        int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
100
100
                        int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
101
101
{
102
 
    int i;
 
102
    int i, ret;
103
103
 
104
104
    if (pkt) {
105
105
        AVStream *st = s->streams[pkt->stream_index];
116
116
            // rewrite pts and dts to be decoded time line position
117
117
            pkt->pts = pkt->dts = aic->dts;
118
118
            aic->dts += pkt->duration;
119
 
            ff_interleave_add_packet(s, pkt, compare_ts);
 
119
            if ((ret = ff_interleave_add_packet(s, pkt, compare_ts)) < 0)
 
120
                return ret;
120
121
        }
121
122
        pkt = NULL;
122
123
    }
126
127
        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
127
128
            AVPacket new_pkt;
128
129
            while (interleave_new_audio_packet(s, &new_pkt, i, flush))
129
 
                ff_interleave_add_packet(s, &new_pkt, compare_ts);
 
130
                if ((ret = ff_interleave_add_packet(s, &new_pkt, compare_ts)) < 0)
 
131
                    return ret;
130
132
        }
131
133
    }
132
134