Commit 48d30f67 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '8729698d'

* commit '8729698d':
  rtsp: Recheck the reordering queue if getting a new packet
  lavr: log channel conversion description for any-to-any functions
  lavr: mix: reduce the mixing matrix when possible
  lavr: cosmetics: reindent
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 249fca3d 8729698d
......@@ -1863,6 +1863,7 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
rt->cur_transport_priv = NULL;
}
redo:
if (rt->transport == RTSP_TRANSPORT_RTP) {
int i;
int64_t first_queue_time = 0;
......@@ -1878,12 +1879,15 @@ int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt)
first_queue_st = rt->rtsp_streams[i];
}
}
if (first_queue_time)
if (first_queue_time) {
wait_end = first_queue_time + s->max_delay;
} else {
wait_end = 0;
first_queue_st = NULL;
}
}
/* read next RTP packet */
redo:
if (!rt->recvbuf) {
rt->recvbuf = av_malloc(RECVBUF_SIZE);
if (!rt->recvbuf)
......
......@@ -378,32 +378,35 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in)
}
}
} else {
switch (ac->func_type) {
case CONV_FUNC_TYPE_FLAT: {
if (!in->is_planar)
len *= in->channels;
if (use_generic) {
for (p = 0; p < ac->planes; p++)
ac->conv_flat_generic(out->data[p], in->data[p], len);
} else {
for (p = 0; p < ac->planes; p++)
ac->conv_flat(out->data[p], in->data[p], len);
switch (ac->func_type) {
case CONV_FUNC_TYPE_FLAT: {
if (!in->is_planar)
len *= in->channels;
if (use_generic) {
for (p = 0; p < ac->planes; p++)
ac->conv_flat_generic(out->data[p], in->data[p], len);
} else {
for (p = 0; p < ac->planes; p++)
ac->conv_flat(out->data[p], in->data[p], len);
}
break;
}
case CONV_FUNC_TYPE_INTERLEAVE:
if (use_generic)
ac->conv_interleave_generic(out->data[0], in->data, len,
ac->channels);
else
ac->conv_interleave(out->data[0], in->data, len, ac->channels);
break;
case CONV_FUNC_TYPE_DEINTERLEAVE:
if (use_generic)
ac->conv_deinterleave_generic(out->data, in->data[0], len,
ac->channels);
else
ac->conv_deinterleave(out->data, in->data[0], len,
ac->channels);
break;
}
break;
}
case CONV_FUNC_TYPE_INTERLEAVE:
if (use_generic)
ac->conv_interleave_generic(out->data[0], in->data, len, ac->channels);
else
ac->conv_interleave(out->data[0], in->data, len, ac->channels);
break;
case CONV_FUNC_TYPE_DEINTERLEAVE:
if (use_generic)
ac->conv_deinterleave_generic(out->data, in->data[0], len, ac->channels);
else
ac->conv_deinterleave(out->data, in->data[0], len, ac->channels);
break;
}
}
out->nb_samples = in->nb_samples;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment