[FFmpeg-devel] [PATCH 6/7] avformat/tee: Use ff_format_output_open() function

sebechlebskyjan at gmail.com sebechlebskyjan at gmail.com
Mon Jul 4 17:45:14 EEST 2016


From: Jan Sebechlebsky <sebechlebskyjan at gmail.com>

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
---
 libavformat/tee.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 996d64d..c60a77f 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -300,12 +300,11 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
             goto end;
     }
 
-    if (!(avf2->oformat->flags & AVFMT_NOFILE)) {
-        if ((ret = avf2->io_open(avf2, &avf2->pb, filename, AVIO_FLAG_WRITE, NULL)) < 0) {
-            av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n",
-                   slave, av_err2str(ret));
-            goto end;
-        }
+    ret = ff_format_output_open(avf2, filename, NULL);
+    if (ret < 0) {
+        av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,
+               av_err2str(ret));
+        goto end;
     }
 
     if ((ret = avformat_write_header(avf2, &options)) < 0) {
-- 
1.9.1



More information about the ffmpeg-devel mailing list