avconv: save two levels of indentation in flush_encoders()

By replacing
if (foo)
    <do stuff>

with
if (!foo)
    continue;
<do stuff>
This commit is contained in:
Anton Khirnov 2011-08-16 11:19:20 +02:00
parent 4a4ce2e743
commit 6f1c66d526

View File

@ -1402,17 +1402,17 @@ static void flush_encoders(int ist_index, OutputStream *ost_table, int nb_ostrea
for (i = 0; i < nb_ostreams; i++) {
OutputStream *ost = &ost_table[i];
if (ost->source_index == ist_index) {
AVCodecContext *enc = ost->st->codec;
AVFormatContext *os = output_files[ost->file_index].ctx;
if (ost->source_index != ist_index || !ost->encoding_needed)
continue;
if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1)
continue;
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
continue;
if (ost->encoding_needed) {
for(;;) {
AVPacket pkt;
int fifo_bytes;
@ -1480,8 +1480,6 @@ static void flush_encoders(int ist_index, OutputStream *ost_table, int nb_ostrea
}
}
}
}
}
/* pkt = NULL means EOF (needed to flush decoder buffers) */
static int output_packet(InputStream *ist, int ist_index,