diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/post.c | 1 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 10 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 16 |
3 files changed, 11 insertions, 16 deletions
diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 98cb3b69c..d9b9fb209 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -436,7 +436,6 @@ void _x_post_frame_copy_down(vo_frame_t *from, vo_frame_t *to) { to->progressive_frame = from->progressive_frame; to->picture_coding_type = from->picture_coding_type; to->drawn = from->drawn; - to->accel_data = from->accel_data; to->stream = from->stream; to->crop_left = from->crop_left; to->crop_right = from->crop_right; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index d128226bb..564eacb5d 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> #define XINE_ENGINE_INTERNAL @@ -121,12 +122,9 @@ static void *video_decoder_loop (void *stream_gen) { int disable_decoder_flush_at_discontinuity; #ifndef WIN32 - /* nice(-value) will fail silently for normal users. - * however when running as root this may provide smoother - * playback. follow the link for more information: - * http://cambuca.ldhs.cetuc.puc-rio.br/~miguel/multimedia_sim/ - */ - nice(-1); + errno = 0; + if (nice(-1) == -1 && errno) + xine_log(stream->xine, XINE_LOG_MSG, "video_decoder: can't raise nice priority by 1: %s\n", strerror(errno)); #endif /* WIN32 */ if (prof_video_decode == -1) diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 35f66a719..2bfc0efef 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -34,6 +34,7 @@ #include <pthread.h> #include <inttypes.h> #include <assert.h> +#include <errno.h> #define XINE_ENABLE_EXPERIMENTAL_FEATURES #define XINE_ENGINE_INTERNAL @@ -536,8 +537,8 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { xine_list_iterator_t ite; /* add cropping requested by frontend */ - img->crop_left += this->crop_left; - img->crop_right += this->crop_right; + img->crop_left = (img->crop_left + this->crop_left) & ~1; + img->crop_right = (img->crop_right + this->crop_right) & ~1; img->crop_top += this->crop_top; img->crop_bottom += this->crop_bottom; @@ -1175,12 +1176,9 @@ static void *video_out_loop (void *this_gen) { int disable_decoder_flush_from_video_out; #ifndef WIN32 - /* nice(-value) will fail silently for normal users. - * however when running as root this may provide smoother - * playback. follow the link for more information: - * http://cambuca.ldhs.cetuc.puc-rio.br/~miguel/multimedia_sim/ - */ - nice(-2); + errno = 0; + if (nice(-2) == -1 && errno) + xine_log(this->xine, XINE_LOG_MSG, "video_out: can't raise nice priority by 2: %s\n", strerror(errno)); #endif /* WIN32 */ disable_decoder_flush_from_video_out = this->xine->config->register_bool(this->xine->config, "engine.decoder.disable_flush_from_video_out", 0, @@ -1821,7 +1819,7 @@ static vo_frame_t * crop_frame( xine_video_port_t *this_gen, vo_frame_t *img ) { yuy2_to_yuy2( /* src */ img->base[0] + img->crop_top * img->pitches[0] + - img->crop_left/2, img->pitches[0], + img->crop_left*2, img->pitches[0], /* dst */ dupl->base[0], dupl->pitches[0], /* width x height */ |