summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.cpp
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-11-15 13:48:25 +0000
committerTim Redfern <tim@eclectronics.org>2013-11-15 13:48:25 +0000
commitfddf215e9ddbfc803d902d4a74f49e2186b4a4da (patch)
tree93fcbc391f572181fee7e5abdfbb2d15789c46c7 /rotord/src/libavwrapper.cpp
parent70c197441dd6eef01fd1e1c88743438cf3aa730d (diff)
changed to NODEID
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
-rw-r--r--rotord/src/libavwrapper.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index e70fddc..225d01e 100644
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -207,15 +207,16 @@ bool libav::exporter::record(std::string filename){
video_st->codec->gop_size = 75; /* emit one intra frame every 75 frames */
video_st->codec->pix_fmt = PIX_FMT_YUV420P;
- cerr<<"Libav::exporter setting bitrate to "<<bitRate<<endl;
+ if (bitRate){
+ cerr<<"Libav::exporter setting bitrate to "<<bitRate<<endl;
+ video_st->codec->bit_rate = bitRate; //need to deal with resolution etc
+ video_st->codec->rc_max_rate = bitRate;
+ video_st->codec->rc_min_rate = 0;
- video_st->codec->bit_rate = bitRate; //need to deal with resolution etc
- video_st->codec->rc_max_rate = bitRate;
- video_st->codec->rc_min_rate = 0;
-
- //added 131113
- video_st->codec->rc_buffer_size = bitRate * 2;
+ //added 131113
+ video_st->codec->rc_buffer_size = bitRate * 2;
+ }
//av_dict_set(&options, "profile", "baseline", 0);
//video_st->codec->flags2 = CODEC_FLAG2_FASTPSKIP;