summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
-rw-r--r--rotord/src/libavwrapper.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index d09b7dc..d4f35ee 100644
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -195,12 +195,22 @@ bool libav::exporter::record(std::string filename){
}
}
+ AVDictionary *opts = NULL; // "create" an empty dictionary
+
+
// Write the stream header, if any. //
- int ret = avformat_write_header(oc, NULL);
+ int ret = avformat_write_header(oc, &opts);
if (ret < 0) {
- //std::cerr <<"Error occurred when opening output file:" << av_err2str(ret) << std::endl;
+ std::cerr <<"Error occurred when opening output file:" <<endl; // av_err2str(ret) << std::endl;
return false;
}
+ //#include <libavformat/movenc.h>
+ //mov_write_moov_tag(AVIOContext *pb, MOVMuxContext *mov, AVFormatContext *s)
+ /*ret = mov_write_moov_tag(oc, NULL,NULL);
+ if (ret < 0) {
+ std::cerr <<"Error occurred when writing moov atom " <<endl; // << av_err2str(ret) << std::endl;
+ return false;
+ }*/
if (frame)
frame->pts = 0;