420{
427
428 TRACE(
"(%p,%p,%p,%p,%d,%d)\n",iface,plStart,plLength,
429 pSource,lStart,lLength);
430
433 if (plStart ==
NULL || *plStart < 0)
435 if (
This->sInfo.dwStart +
This->sInfo.dwLength < *plStart)
439 if (lStart < srcInfo.dwStart || lStart >= srcInfo.
dwStart + srcInfo.
dwLength)
441 if (
This->sInfo.fccType == 0) {
442
444 This->sInfo.dwStart = *plStart;
445 This->sInfo.dwLength = 0;
446 }
449 if (lLength == -1)
453 if (lLength + *plStart >= 0x80000000)
455
456
459
461 if (
size !=
This->sInfo.rcFrame.right -
This->sInfo.rcFrame.left)
464 if (
size !=
This->sInfo.rcFrame.bottom -
This->sInfo.rcFrame.top)
469 } else {
470
472 }
473
474
477
478
480 if (!
This->bDecompress) {
481
482
483
484
485
486
487 if ((pEdit !=
NULL && pEdit->bDecompress) ||
491
493 This->pStreams[0].dwStart);
494
495
498 &startPos, &streamNr,
TRUE)))
500 for (
n = lStart;
n < lStart + lLength; streamNr++) {
503 startPos = pEdit->pStreams[streamNr].dwStart;
504 n += pEdit->pStreams[streamNr].dwLength;
505 }
508
510 This->sInfo.fccHandler = 0;
511 }
514 }
515
516
519
521 &endPos, &nLastStream,
TRUE);
523 &startPos, &streamNr,
FALSE);
524 if (nLastStream == streamNr)
525 nLastStream++;
526
528 } else
532
536 This->nTableSize =
n;
537 }
538
539 if (plLength !=
NULL)
540 *plLength = lLength;
541
542
543 if (
This->sInfo.dwStart +
This->sInfo.dwLength > *plStart) {
545 &startPos, &streamNr,
FALSE);
546 if (startPos !=
This->pStreams[streamNr].dwStart) {
547
549 This->pStreams + streamNr,
551
552 This->pStreams[streamNr + 2].dwLength =
554 This->pStreams[streamNr + 2].dwStart = startPos;
555 This->pStreams[streamNr].dwLength =
556 startPos -
This->pStreams[streamNr].dwStart;
558 streamNr++;
559 } else {
560
563 }
564 } else
565 streamNr =
This->nStreams;
566
568
572
573 memcpy(
This->pStreams + streamNr, pEdit->pStreams +
n,
575 if (
This->pStreams[streamNr].dwStart < startPos) {
576 This->pStreams[streamNr].dwLength =
578 This->pStreams[streamNr].dwStart = startPos;
579 }
583 } else {
584
585 This->pStreams[streamNr].pStream = pSource;
586 This->pStreams[streamNr].dwStart = lStart;
587 This->pStreams[streamNr].dwLength = lLength;
588 }
589
592 if (0 < streamNr +
n &&
593 This->pStreams[streamNr +
n - 1].pStream !=
This->pStreams[streamNr +
n].pStream) {
595 This->sInfo.dwFormatChangeCount++;
596 }
597 }
598 This->sInfo.dwEditCount++;
599 This->sInfo.dwLength += lLength;
601
603}
static BOOL AVIFILE_FormatsEqual(PAVISTREAM avi1, PAVISTREAM avi2)
static LPVOID AVIFILE_ReadFrame(IAVIEditStreamImpl *const This, PAVISTREAM pstream, LONG pos)
#define AVISTREAMINFO_FORMATCHANGES
#define AVIERR_UNSUPPORTED
#define AVIStreamNearestKeyFrame(pavi, pos)
#define IAVIStream_Info(p, a, b)