out
authoryu.dongliang <18588496441@163.com>
Mon, 10 Apr 2023 08:17:44 +0000 (16:17 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 10 Apr 2023 08:17:44 +0000 (16:17 +0800)
main.c

diff --git a/main.c b/main.c
index c14672778b20fa90a707f77943396f436c1c65aa..97f438e3494a7fbe087f58b1d964a8deb82e21b5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -21,18 +21,29 @@ int main(int argc, char* argv[])
                return -1;
        }
 
+       if (simp_avio_open(&out, "ffmpeg_output", argv[2]) < 0) {
+               scf_loge("\n");
+               return -1;
+       }
+
        if (simp_filter_open(&f) < 0) {
                scf_loge("\n");
                return -1;
        }
 
-       simp_filter_add_input(f, in);
+       simp_filter_add_input (f, in);
+       simp_filter_add_output(f, out);
 
        if (simp_filter_run(f) < 0) {
                scf_loge("\n");
                return -1;
        }
 
+       if (simp_avio_run(out) < 0) {
+               scf_loge("\n");
+               return -1;
+       }
+
        if (simp_avio_run(in) < 0) {
                scf_loge("\n");
                return -1;