Re: [FFmpeg-devel] [PATCH v2] Enable dash output to work when the output isn't a local file

2016-02-28 Thread Michael Niedermayer
On Wed, Jan 06, 2016 at 09:57:41AM +0100, Raymond Hilseth wrote:
> Use avpriv_io_move instead of ff_rename to support more than only
> the file protocol.
> 
> Enabled the implementation of file_move in libavformat/file.c for
> systems not having unistd.h since it only requires the rename function
> from os_support.h.
> 
> Signed-off-by: Raymond Hilseth 

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH v2] Enable dash output to work when the output isn't a local file

2016-01-06 Thread Raymond Hilseth
Use avpriv_io_move instead of ff_rename to support more than only
the file protocol.

Enabled the implementation of file_move in libavformat/file.c for
systems not having unistd.h since it only requires the rename function
from os_support.h.

Signed-off-by: Raymond Hilseth 
---
 libavformat/dashenc.c | 4 ++--
 libavformat/file.c| 4 
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 4509ee4..378c4e4 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -549,7 +549,7 @@ static int write_manifest(AVFormatContext *s, int final)
 avio_printf(out, "\n");
 avio_flush(out);
 avio_close(out);
-return ff_rename(temp_filename, s->filename, s);
+return avpriv_io_move(temp_filename, s->filename);
 }
 
 static int dash_write_header(AVFormatContext *s)
@@ -856,7 +856,7 @@ static int dash_flush(AVFormatContext *s, int final, int 
stream)
 } else {
 ffurl_close(os->out);
 os->out = NULL;
-ret = ff_rename(temp_path, full_path, s);
+ret = avpriv_io_move(temp_path, full_path);
 if (ret < 0)
 break;
 }
diff --git a/libavformat/file.c b/libavformat/file.c
index a318408..e56ea79 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -176,7 +176,6 @@ static int file_delete(URLContext *h)
 
 static int file_move(URLContext *h_src, URLContext *h_dst)
 {
-#if HAVE_UNISTD_H
 const char *filename_src = h_src->filename;
 const char *filename_dst = h_dst->filename;
 av_strstart(filename_src, "file:", _src);
@@ -186,9 +185,6 @@ static int file_move(URLContext *h_src, URLContext *h_dst)
 return AVERROR(errno);
 
 return 0;
-#else
-return AVERROR(ENOSYS);
-#endif /* HAVE_UNISTD_H */
 }
 
 #if CONFIG_FILE_PROTOCOL
-- 
2.4.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel