diff options
| author | ameerj <aj662@drexel.edu> | 2020-11-23 13:25:01 -0500 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-02-13 13:07:31 -0500 |
| commit | ac265a72ce4176ceb3cd10a5548ab71519771640 (patch) | |
| tree | 0acde029388d465a5801db9106dd8f4e026e57e8 /src/video_core/command_classes/codecs/codec.cpp | |
| parent | 83227ad981aee7bff00b06788fdebff038505520 (diff) | |
nvdec cleanup
Diffstat (limited to 'src/video_core/command_classes/codecs/codec.cpp')
| -rw-r--r-- | src/video_core/command_classes/codecs/codec.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp index 39bc923a5..d02dc6260 100644 --- a/src/video_core/command_classes/codecs/codec.cpp +++ b/src/video_core/command_classes/codecs/codec.cpp @@ -44,8 +44,10 @@ Codec::~Codec() { } void Codec::SetTargetCodec(NvdecCommon::VideoCodec codec) { - LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", codec); - current_codec = codec; + if (current_codec != codec) { + LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", static_cast<u32>(codec)); + current_codec = codec; + } } void Codec::StateWrite(u32 offset, u64 arguments) { @@ -55,7 +57,6 @@ void Codec::StateWrite(u32 offset, u64 arguments) { void Codec::Decode() { bool is_first_frame = false; - if (!initialized) { if (current_codec == NvdecCommon::VideoCodec::H264) { av_codec = avcodec_find_decoder(AV_CODEC_ID_H264); |
