419{
426
427 TRACE(
"(%p,%p,%p,%p,%ld,%ld)\n",iface,plStart,plLength,
428 pSource,lStart,lLength);
429
432 if (plStart ==
NULL || *plStart < 0)
434 if (
This->sInfo.dwStart +
This->sInfo.dwLength < *plStart)
438 if (lStart < srcInfo.dwStart || lStart >= srcInfo.
dwStart + srcInfo.
dwLength)
440 if (
This->sInfo.fccType == 0) {
441
443 This->sInfo.dwStart = *plStart;
444 This->sInfo.dwLength = 0;
445 }
448 if (lLength == -1)
452 if (lLength + *plStart >= 0x80000000)
454
455
458
460 if (
size !=
This->sInfo.rcFrame.right -
This->sInfo.rcFrame.left)
463 if (
size !=
This->sInfo.rcFrame.bottom -
This->sInfo.rcFrame.top)
468 } else {
469
471 }
472
473
476
477
479 if (!
This->bDecompress) {
480
481
482
483
484
485
486 if ((pEdit !=
NULL && pEdit->bDecompress) ||
490
492 This->pStreams[0].dwStart);
493
494
497 &startPos, &streamNr,
TRUE)))
499 for (
n = lStart;
n < lStart + lLength; streamNr++) {
502 startPos = pEdit->pStreams[streamNr].dwStart;
503 n += pEdit->pStreams[streamNr].dwLength;
504 }
507
509 This->sInfo.fccHandler = 0;
510 }
513 }
514
515
518
520 &endPos, &nLastStream,
TRUE);
522 &startPos, &streamNr,
FALSE);
523 if (nLastStream == streamNr)
524 nLastStream++;
525
527 } else
531
535 This->nTableSize =
n;
536 }
537
538 if (plLength !=
NULL)
539 *plLength = lLength;
540
541
542 if (
This->sInfo.dwStart +
This->sInfo.dwLength > *plStart) {
544 &startPos, &streamNr,
FALSE);
545 if (startPos !=
This->pStreams[streamNr].dwStart) {
546
548 This->pStreams + streamNr,
550
551 This->pStreams[streamNr + 2].dwLength =
553 This->pStreams[streamNr + 2].dwStart = startPos;
554 This->pStreams[streamNr].dwLength =
555 startPos -
This->pStreams[streamNr].dwStart;
557 streamNr++;
558 } else {
559
562 }
563 } else
564 streamNr =
This->nStreams;
565
567
571
572 memcpy(
This->pStreams + streamNr, pEdit->pStreams +
n,
574 if (
This->pStreams[streamNr].dwStart < startPos) {
575 This->pStreams[streamNr].dwLength =
577 This->pStreams[streamNr].dwStart = startPos;
578 }
582 } else {
583
584 This->pStreams[streamNr].pStream = pSource;
585 This->pStreams[streamNr].dwStart = lStart;
586 This->pStreams[streamNr].dwLength = lLength;
587 }
588
591 if (0 < streamNr +
n &&
592 This->pStreams[streamNr +
n - 1].pStream !=
This->pStreams[streamNr +
n].pStream) {
594 This->sInfo.dwFormatChangeCount++;
595 }
596 }
597 This->sInfo.dwEditCount++;
598 This->sInfo.dwLength += lLength;
600
602}
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)