ffmpeg: 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-30 15:56:03 +02:00 committed by Michael Niedermayer
parent a16f1afb11
commit 47a3439ee7

View File

@ -1451,17 +1451,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;
@ -1529,8 +1529,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,