ffmpeg: break immediately after av_read_frame()

Remove one indent level.
This commit is contained in:
Max Kellermann 2008-10-30 19:03:31 +01:00
parent 5f1df0a927
commit 130fc58b36

View File

@ -280,16 +280,15 @@ ffmpeg_decode_internal(BasePtrs *base)
decoder_command_finished(decoder); decoder_command_finished(decoder);
} }
if (av_read_frame(pFormatCtx, &packet) >= 0) { if (av_read_frame(pFormatCtx, &packet) < 0)
if (packet.stream_index == base->audioStream) /* end of file */
ffmpeg_send_packet(decoder, &packet, aCodecCtx,
&pFormatCtx->streams[base->audioStream]->time_base);
av_free_packet(&packet);
} else {
//end of file
break; break;
}
if (packet.stream_index == base->audioStream)
ffmpeg_send_packet(decoder, &packet, aCodecCtx,
&pFormatCtx->streams[base->audioStream]->time_base);
av_free_packet(&packet);
} while (decoder_get_command(decoder) != DECODE_COMMAND_STOP); } while (decoder_get_command(decoder) != DECODE_COMMAND_STOP);
return true; return true;