Commit 7744dc57 authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation with latest openh264 release that had been broken with...

Fix compilation with latest openh264 release that had been broken with 3a0f6e84.
parent b64992a4
......@@ -53,6 +53,10 @@ void MSOpenH264Decoder::initialize()
mUnpacker=rfc3984_new();
if (mDecoder != 0) {
SDecodingParam params = { 0 };
#if (OPENH264_MAJOR == 1) && (OPENH264_MINOR >=6)
#else
params.eOutputColorFormat = videoFormatI420;
#endif
params.uiTargetDqLayer = (unsigned char) -1;
params.eEcActiveIdc = ERROR_CON_FRAME_COPY_CROSS_IDR;
params.sVideoProperty.size = sizeof(params.sVideoProperty);
......
......@@ -126,8 +126,13 @@ void MSOpenH264Encoder::initialize()
params.sSpatialLayers[0].fFrameRate = mVConf.fps;
params.sSpatialLayers[0].iSpatialBitrate = targetBitrate;
params.sSpatialLayers[0].iMaxSpatialBitrate = maxBitrate;
#if (OPENH264_MAJOR == 1) && (OPENH264_MINOR >=6)
params.sSpatialLayers[0].sSliceArgument.uiSliceMode = SM_SIZELIMITED_SLICE;
params.sSpatialLayers[0].sSliceArgument.uiSliceSizeConstraint = ms_factory_get_payload_max_size(mFilter->factory);
#else
params.sSpatialLayers[0].sSliceCfg.uiSliceMode = SM_DYN_SLICE;
params.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceSizeConstraint = ms_factory_get_payload_max_size(mFilter->factory);
#endif
ret = mEncoder->InitializeExt(&params);
if (ret != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment