Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 12 files). Show all
Unified · Split
| @@ -289,20 +289,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 288 unmodified lines | |||
| 289 | if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL && | 289 | if (m_pDecContext == NULL && eOptID != DECODER_OPTION_TRACE_LEVEL && |
| 290 | eOptID != DECODER_OPTION_TRACE_CALLBACK && eOptID != DECODER_OPTION_TRACE_CALLBACK_CONTEXT) | 290 | eOptID != DECODER_OPTION_TRACE_CALLBACK && eOptID != DECODER_OPTION_TRACE_CALLBACK_CONTEXT) |
| 291 | return dsInitialOptExpected; | 291 | return dsInitialOptExpected; |
| 292 | 292 | if (eOptID == DECODER_OPTION_END_OF_STREAM) { // Indicate bit-stream of the final frame to be decoded | |
| 293 | if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame | ||
| 294 | if (m_pDecContext->bParseOnly) { | ||
| 295 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, | ||
| 296 | "CWelsDecoder::SetOption for data format meaningless for parseonly."); | ||
| 297 | return cmResultSuccess; | ||
| 298 | } | ||
| 299 | if (pOption == NULL) | ||
| 300 | return cmInitParaError; | ||
| 301 | |||
| 302 | iVal = * ((int*)pOption); // is_rgb | ||
| 303 | |||
| 304 | return DecoderSetCsp (m_pDecContext, iVal); | ||
| 305 | } else if (eOptID == DECODER_OPTION_END_OF_STREAM) { // Indicate bit-stream of the final frame to be decoded | ||
| 306 | if (pOption == NULL) | 293 | if (pOption == NULL) |
| 307 | return cmInitParaError; | 294 | return cmInitParaError; |
| 308 | 295 | ||
| @@ -371,11 +358,7 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 62 unmodified lines | |||
| 371 | if (pOption == NULL) | 358 | if (pOption == NULL) |
| 372 | return cmInitParaError; | 359 | return cmInitParaError; |
| 373 | 360 | ||
| 374 | if (DECODER_OPTION_DATAFORMAT == eOptID) { | 361 | if (DECODER_OPTION_END_OF_STREAM == eOptID) { |
| 375 | iVal = (int32_t) m_pDecContext->eOutputColorFormat; | ||
| 376 | * ((int*)pOption) = iVal; | ||
| 377 | return cmResultSuccess; | ||
| 378 | } else if (DECODER_OPTION_END_OF_STREAM == eOptID) { | ||
| 379 | iVal = m_pDecContext->bEndOfStreamFlag; | 362 | iVal = m_pDecContext->bEndOfStreamFlag; |
| 380 | * ((int*)pOption) = iVal; | 363 | * ((int*)pOption) = iVal; |
| 381 | return cmResultSuccess; | 364 | return cmResultSuccess; |