rewrote debug message handler
This commit is contained in:
@@ -53,7 +53,7 @@ void PreviewGenerator::parse_media() {
|
||||
for (int i=0;i<(int)fmt_ctx->nb_streams;i++) {
|
||||
// Find the decoder for the video stream
|
||||
if (avcodec_find_decoder(fmt_ctx->streams[i]->codecpar->codec_id) == NULL) {
|
||||
dout << "[ERROR] Unsupported codec in stream" << i << "of file" << footage->name;
|
||||
qCritical() << "Unsupported codec in stream" << i << "of file" << footage->name;
|
||||
} else {
|
||||
FootageStream ms;
|
||||
ms.preview_done = false;
|
||||
@@ -253,13 +253,13 @@ void PreviewGenerator::generate_waveform() {
|
||||
|
||||
if (read_ret < 0) {
|
||||
end_of_file = true;
|
||||
if (read_ret != AVERROR_EOF) dout << "[ERROR] Failed to read packet for preview generation" << read_ret;
|
||||
if (read_ret != AVERROR_EOF) qCritical() << "Failed to read packet for preview generation" << read_ret;
|
||||
break;
|
||||
}
|
||||
if (codec_ctx[packet->stream_index] != NULL) {
|
||||
int send_ret = avcodec_send_packet(codec_ctx[packet->stream_index], packet);
|
||||
if (send_ret < 0 && send_ret != AVERROR(EAGAIN)) {
|
||||
dout << "[ERROR] Failed to send packet for preview generation - aborting" << send_ret;
|
||||
qCritical() << "Failed to send packet for preview generation - aborting" << send_ret;
|
||||
end_of_file = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user