Commit 42678c75 authored by Simon Morlat's avatar Simon Morlat

fix bug in av bitrate driver.

parent 6b933547
......@@ -222,6 +222,7 @@ static int inc_video_bitrate(MSAVBitrateDriver *obj, const MSRateControlAction *
int newbr;
int ret=0;
if (obj->cur_bitrate==0) return -1; /*current bitrate was not known*/
newbr=(float)obj->cur_bitrate*(1.0+((float)action->value/100.0));
if (newbr>obj->nom_bitrate){
newbr=obj->nom_bitrate;
......
......@@ -240,11 +240,11 @@ static void configure_video_source(VideoStream *stream){
/* transmit orientation to source filter */
ms_filter_call_method(stream->source,MS_VIDEO_CAPTURE_SET_DEVICE_ORIENTATION,&stream->device_orientation);
/* initialize the capture device orientation for preview */
if( ms_filter_has_method(stream->source, MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION) )
ms_filter_call_method(stream->source,MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION,&stream->device_orientation);
/* initialize the capture device orientation for preview */
if( ms_filter_has_method(stream->source, MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION) )
ms_filter_call_method(stream->source,MS_VIDEO_DISPLAY_SET_DEVICE_ORIENTATION,&stream->device_orientation);
/* transmit its preview window id if any to source filter*/
/* transmit its preview window id if any to source filter*/
if (stream->preview_window_id!=0){
video_stream_set_native_preview_window_id(stream, stream->preview_window_id);
}
......
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