cuvidParseVideoData() don't call callback function!

Hi, All
I am Big bignner in CUDA API.
Recently I have been compiled and executed the CUDA SDK 4.0 and CUDA API 2.0 sample(Best Codecs and Video Processing Software, Promo Codes & Deals)
That is executed perfectly in the case of using H.264 bitstream file.
But I want to execute not H.264 file format but H.264 bitstream coming from IP camera.
In my using IP camera, I call the H.264 bitstream which is encoded per frame.
Also my test graphic card is NVIDA Geforce GTS450.
The next paragraph is sample source code, which reads the H.264 bitstream and
pkt.flages is CUVID_PKT_ENDOFSTREAM or 0 according to len.
lastly cuvidParseVideoData() is called and then callback function(HandleVideoSequence(),HandlePictureDecode() and HandlePictureDisplay()) is executed.

for (;External Image
{
CUVIDSOURCEDATAPACKET pkt;
int len = fread(io_buffer, 1, sizeof(io_buffer), fInput);
packet_cnt++;
if (len <= 0)
{
// Flush the decoder
pkt.flags = CUVID_PKT_ENDOFSTREAM;
pkt.payload_size = 0;
pkt.payload = NULL;
pkt.timestamp = 0;
cuvidParseVideoData(state.cuParser, &pkt);
break;
}
pkt.flags = 0;
pkt.payload_size = len;
pkt.payload = io_buffer;
pkt.timestamp = 0; // not using timestamps
cuvidParseVideoData(state.cuParser, &pkt);
}

But My source is not recall callback function after calling frome cuvidParseVideoData().
Next paragraph is that I rewrite the sample source as following:

pkt.flags = CUVID_PKT_ENDOFSTREAM;
pkt.payload_size = nEncSize;
pkt.payload = inbuf_ptr;
pkt.timestamp = 0; // not using timestamps
cuvidParseVideoData(state.cuParser, &pkt); // callback …

My source calls the callback function(HandleVideoSequence(),HandlePictureDecode(),HandlePictureDisplay()).
But, as you see there is a problem because of using the CUVID_PKT_ENDOFSTREAM.
Whenever my source calls next packet, there is not recalled callback function.

How do I solve the problem?

Best regards,
nrson

hi, did you solve your problems? Can you share your solution? I am having the same problem here and there is not anything helpful on the internet