- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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]
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page