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 | long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { | 237 | long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { |
| 238 | int iVal = 0; | 238 | int iVal = 0; |
| 239 | 239 | ||
| 240 | if (m_pDecContext == NULL) | 240 | if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL) |
| 241 | return dsInitialOptExpected; | 241 | return dsInitialOptExpected; |
| 242 | 242 | ||
| 243 | if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame | 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 | iVal = * ((int*)pOption); //EC method | 263 | iVal = * ((int*)pOption); //EC method |
| 264 | m_pDecContext->iErrorConMethod = iVal; | 264 | m_pDecContext->iErrorConMethod = iVal; |
| 265 | return cmResultSuccess; | 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 | return cmInitParaError; | 274 | return cmInitParaError; |