Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -237,7 +237,7 @@ void CWelsDecoder::InitDecoder (void) { · 236 unmodified lines | ||
| 237 | 237 | long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { |
| 238 | 238 | int iVal = 0; |
| 239 | 239 | |
| 240 | − if (m_pDecContext == NULL) | |
| 240 | + if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL) | |
| 241 | 241 | return dsInitialOptExpected; |
| 242 | 242 | |
| 243 | 243 | if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame |
| @@ -263,6 +263,12 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 19 unmodified lines | ||
| 263 | 263 | iVal = * ((int*)pOption); //EC method |
| 264 | 264 | m_pDecContext->iErrorConMethod = iVal; |
| 265 | 265 | return cmResultSuccess; |
| 266 | + } else if (eOptID == DECODER_OPTION_TRACE_LEVEL) { | |
| 267 | + if (m_pWelsTrace) { | |
| 268 | + uint32_t level = * ((uint32_t*)pOption); | |
| 269 | + m_pWelsTrace->SetTraceLevel (level); | |
| 270 | + } | |
| 271 | + return cmResultSuccess; | |
| 266 | 272 | } |
| 267 | 273 | |
| 268 | 274 | return cmInitParaError; |