| 413 | } |
| 414 | |
| 415 | void ffmpegAudioFilter::flush() |
| 416 | { |
| 417 | if (mPThread) { |
| 418 | mPThread->pause(); |
| 419 | } |
| 420 | |
| 421 | while (!mPts.empty()) { |
| 422 | mPts.pop(); |
| 423 | } |
| 424 | |
| 425 | while (!mInPut.empty()) { |
| 426 | delete mInPut.front(); |
| 427 | mInPut.pop(); |
| 428 | } |
| 429 | |
| 430 | while (!mOutPut.empty()) { |
| 431 | delete mOutPut.front(); |
| 432 | mOutPut.pop(); |
| 433 | } |
| 434 | |
| 435 | if (m_pFilterGraph) { |
| 436 | avfilter_graph_free(&m_pFilterGraph); |
| 437 | } |
| 438 | |
| 439 | if (mPThread) { |
| 440 | mPThread->start(); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | } |