Commit df9cc7f0 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Marton Balint

avformat/tee: Use ff_format_output_open() function

Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarJan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 6a3515a5
...@@ -300,12 +300,11 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) ...@@ -300,12 +300,11 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
goto end; goto end;
} }
if (!(avf2->oformat->flags & AVFMT_NOFILE)) { ret = ff_format_output_open(avf2, filename, NULL);
if ((ret = avf2->io_open(avf2, &avf2->pb, filename, AVIO_FLAG_WRITE, NULL)) < 0) { if (ret < 0) {
av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,
slave, av_err2str(ret)); av_err2str(ret));
goto end; goto end;
}
} }
if ((ret = avformat_write_header(avf2, &options)) < 0) { if ((ret = avformat_write_header(avf2, &options)) < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment