Skip to content

Commit

Permalink
Moving catch into loop
Browse files Browse the repository at this point in the history
  • Loading branch information
jpc0 committed Mar 20, 2023
1 parent 7bf0d6a commit 09e172d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/ffmpeg/producer/av_producer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ class Decoder
packet = std::move(input.front());
input.pop();
}
FF(avcodec_send_packet(ctx.get(), packet.get()));
try {
FF(avcodec_send_packet(ctx.get(), packet.get()));
} catch (...) {
CASPAR_LOG_CURRENT_EXCEPTION();
}
} else if (ret == AVERROR_EOF) {
avcodec_flush_buffers(ctx.get());
av_frame->pts = next_pts;
Expand Down Expand Up @@ -205,9 +209,6 @@ class Decoder
}
} catch (boost::thread_interrupted&) {
// Do nothing...
} catch (...) {
CASPAR_LOG_CURRENT_EXCEPTION();
eof = true;
}
});
}
Expand Down

0 comments on commit 09e172d

Please sign in to comment.