| 597 | } |
| 598 | |
| 599 | bool FileSourceFFmpegFile::seekToDTS(int64_t dts) |
| 600 | { |
| 601 | if (!this->isFileOpened) |
| 602 | return false; |
| 603 | |
| 604 | int ret = this->ff.seekFrame(this->formatCtx, this->video_stream.getIndex(), dts); |
| 605 | if (ret != 0) |
| 606 | { |
| 607 | DEBUG_FFMPEG("FFmpegLibraries::seekToDTS Error DTS %ld. Return Code %d", dts, ret); |
| 608 | return false; |
| 609 | } |
| 610 | |
| 611 | // We seeked somewhere, so we are not at the end of the file anymore. |
| 612 | this->endOfFile = false; |
| 613 | |
| 614 | DEBUG_FFMPEG("FFmpegLibraries::seekToDTS Successfully seeked to DTS %d", (int)dts); |
| 615 | return true; |
| 616 | } |
| 617 | |
| 618 | bool FileSourceFFmpegFile::seekFileToBeginning() |
| 619 | { |
no test coverage detected