summaryrefslogtreecommitdiff
path: root/libavformat/audiointerleave.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-17 14:18:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-17 14:20:10 +0200
commite5cb7795fcafdf6bad58ba35161527b4a03b1122 (patch)
treea3dfbd82acdc4c2dc6205e2ee4c26ef115998d34 /libavformat/audiointerleave.c
parent5fce29ef29e416d843a139e083ae9d3f7783132a (diff)
parent324ff59444ff5470bb325ff1e2be7c4b054fc944 (diff)
downloadffmpeg-e5cb7795fcafdf6bad58ba35161527b4a03b1122.tar.gz
Merge commit '324ff59444ff5470bb325ff1e2be7c4b054fc944'
* commit '324ff59444ff5470bb325ff1e2be7c4b054fc944': avpacket: Check for and return errors in ff_interleave_add_packet() Conflicts: libavformat/audiointerleave.c libavformat/internal.h libavformat/mux.c See: 4d7c71c36467331f1e0c0f17af9f371d33308a9c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/audiointerleave.c')
-rw-r--r--libavformat/audiointerleave.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
index 7f580b970d..80bf768579 100644
--- a/libavformat/audiointerleave.c
+++ b/libavformat/audiointerleave.c
@@ -105,7 +105,7 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
int (*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int),
int (*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
{
- int i;
+ int i, ret;
if (pkt) {
AVStream *st = s->streams[pkt->stream_index];
@@ -119,12 +119,10 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
}
av_fifo_generic_write(aic->fifo, pkt->data, pkt->size, NULL);
} else {
- int ret;
// rewrite pts and dts to be decoded time line position
pkt->pts = pkt->dts = aic->dts;
aic->dts += pkt->duration;
- ret = ff_interleave_add_packet(s, pkt, compare_ts);
- if (ret < 0)
+ if ((ret = ff_interleave_add_packet(s, pkt, compare_ts)) < 0)
return ret;
}
pkt = NULL;
@@ -134,10 +132,8 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
AVStream *st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
AVPacket new_pkt;
- int ret;
while ((ret = interleave_new_audio_packet(s, &new_pkt, i, flush)) > 0) {
- ret = ff_interleave_add_packet(s, &new_pkt, compare_ts);
- if (ret < 0)
+ if ((ret = ff_interleave_add_packet(s, &new_pkt, compare_ts)) < 0)
return ret;
}
if (ret < 0)