Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

UMC_ERR_SYNC

Hello,
sorry for asking such a dumb question.
What actually UMC_ERR_SYNC stands for.
It is written that;
UMC_ERR_SYNC: Required syncronization code was not found
Is this syncronization code for syncronizing audio and video or what?
I am getting this error for some video streams in which audio does not exists.
GetFrame function of MPEG4decoder is returning this err code.
But almost 95 percent of the streams(without audio) does not generate this error.
Thanks in advance
0 Kudos
5 Replies
Highlighted
Employee
9 Views


Hello,

It is not the synchronization of audio and video code. The error reported when it cannot find the start of code of the video sequence. For example, it cannot find GOV or VOP Start Code etc.

Thanks,
Chao

0 Kudos
Highlighted
Beginner
9 Views

Thanks for reply.
Is there any bad consequences if I ignore this error?
Because if I ignore this error, decoded stream still seems ok.
Is it normal?
Thanks in advance
0 Kudos
Highlighted
Employee
9 Views


Hello,

It is fine to ignore such error, and try to continue decoding the following stream. If the stream contains some unexpected data, the decoder will try to ignore such data, and find the following correct data.

You can check the example code in the simpleplayer application:
file avsync.cpp, function: AVSync::VideoProc()


Thanks,
Chao

0 Kudos
Highlighted
Beginner
9 Views

Hello Chao,
thanks for your reply. I had a quick look at the function. But unfortunately I couldn't find any hint.
I'll be appreciated if you can provide me some sample code?
I am decoding MPEG4, and encoding it to JPEG.
MPEG4 decoder's GetFrame function returning mentioned error code.
Thanks in advance,
victor
0 Kudos
Highlighted
Employee
9 Views


Hi victor,


the simpleplayer is the sample code in UMC.

The structure in that function is actually like the following, which maybe possibly easier to understand.


Thanks,
Chao

[bash]umcRes =UMC::UMC_OK; 
HaveMoreData = TRUE;

for (frameNumber = 0; (!exit_flag) && UMC::UMC_OK == umcRes; )
{
 do {
     if ((4 >= DataIn.GetDataSize() || umcRes == UMC::UMC_ERR_NOT_ENOUGH_DATA) && (HaveMoreData)){ 
       ReadSomeFrameData(.....);
       if( StillMoreData...) {
            HaveMoreData = TRUE;
       }else{ 
           HaveMoreData = FALSE;
       }
     
      if( HaveMoreData )
      { 
         umcRes= Decoder.GetFrame(&DataIn, &DataOut); 
          if (umcRes == UMC::UMC_OK){ 
           ; Now it get One frame data...
           frameNumber++;
         }
     }else{
        umcRes = Decoder.GetFrame(NULL, &DataOut);
        if (status == UMC::UMC_OK) { 
         ; Got the buffer frame data lest in the decoder.
         frameNumber++;
        }
     }
   }while (((UMC::UMC_ERR_NOT_ENOUGH_DATA == umcRes && HaveMoreData ) ||UMC::UMC_ERR_SYNC == umcRes) && !exit_flag);

   if (UMC::UMC_OK != umcRes || exit_flag)
   { break; }

}[/bash]
0 Kudos