mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 00:03:45 +08:00
Revert "Encoderd: encoders just encode, no writing (#28482)"
This reverts commit eed43696f113feeac757b147a782b8c063638a63. old-commit-hash: 5161c2364538236b51674fbc63c7f9666e95928b
This commit is contained in:
@@ -60,6 +60,7 @@ void FfmpegEncoder::encoder_open(const char* path) {
|
||||
int err = avcodec_open2(this->codec_ctx, codec, NULL);
|
||||
assert(err >= 0);
|
||||
|
||||
writer_open(path);
|
||||
is_open = true;
|
||||
segment_num++;
|
||||
counter = 0;
|
||||
@@ -68,6 +69,7 @@ void FfmpegEncoder::encoder_open(const char* path) {
|
||||
void FfmpegEncoder::encoder_close() {
|
||||
if (!is_open) return;
|
||||
|
||||
writer_close();
|
||||
avcodec_free_context(&codec_ctx);
|
||||
is_open = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user