summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2014-04-09 16:50:10 +0200
committerTorsten Jager <t.jager@gmx.de>2014-04-09 16:50:10 +0200
commit211614d703e49e98f88fa44c9ef43015af44311a (patch)
treec0e2a8eea26bb63ed9187d6aee9a7d159e99776c /src
parentcd927309ba54474d4db35d9ba2deabb241675540 (diff)
downloadxine-lib-211614d703e49e98f88fa44c9ef43015af44311a.tar.gz
xine-lib-211614d703e49e98f88fa44c9ef43015af44311a.tar.bz2
Handle "no vo soft render space": enable vo_none.
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_none.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c
index acbc2cacf..d541dd0d5 100644
--- a/src/video_out/video_out_none.c
+++ b/src/video_out/video_out_none.c
@@ -135,8 +135,17 @@ static void none_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_fram
uv_size = frame->vo_frame.pitches[1] * ((height+1)/2);
frame->vo_frame.base[0] = malloc (y_size + 2*uv_size);
- frame->vo_frame.base[1] = frame->vo_frame.base[0]+y_size+uv_size;
- frame->vo_frame.base[2] = frame->vo_frame.base[0]+y_size;
+ if (frame->vo_frame.base[0]) {
+ frame->vo_frame.base[1] = frame->vo_frame.base[0] + y_size;
+ frame->vo_frame.base[2] = frame->vo_frame.base[0] + y_size + uv_size;
+ } else {
+ frame->vo_frame.base[1] = NULL;
+ frame->vo_frame.base[2] = NULL;
+ xprintf (this->xine, XINE_VERBOSITY_DEBUG,
+ "video_out_none: error. (framedata allocation failed: out of memory)\n");
+ frame->width = 0;
+ frame->vo_frame.width = 0;
+ }
}
break;
@@ -145,6 +154,12 @@ static void none_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_fram
frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height);
frame->vo_frame.base[1] = NULL;
frame->vo_frame.base[2] = NULL;
+ if (!frame->vo_frame.base[0]) {
+ xprintf (this->xine, XINE_VERBOSITY_DEBUG,
+ "video_out_none: error. (framedata allocation failed: out of memory)\n");
+ frame->width = 0;
+ frame->vo_frame.width = 0;
+ }
break;
default:
@@ -152,16 +167,6 @@ static void none_update_frame_format(vo_driver_t *vo_driver, vo_frame_t *vo_fram
break;
}
-
- if((format == XINE_IMGFMT_YV12
- && (frame->vo_frame.base[0] == NULL
- || frame->vo_frame.base[1] == NULL
- || frame->vo_frame.base[2] == NULL))
- || (format == XINE_IMGFMT_YUY2 && frame->vo_frame.base[0] == NULL)) {
- xprintf (this->xine, XINE_VERBOSITY_DEBUG,
- "video_out_none: error. (framedata allocation failed: out of memory)\n");
- free_framedata(frame);
- }
}
frame->ratio = ratio;