summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-02-27 01:12:05 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-02-27 01:12:05 +0000
commitc289940052959755522c1598f224cde7f59c32db (patch)
tree60ec841ee8b8a1d7004b7fd471b96ec7c7fd6f79
parentfc49d0c1d413ec476c1ffeea6c484264cd1cfc58 (diff)
downloadmpv-c289940052959755522c1598f224cde7f59c32db.tar.bz2
mpv-c289940052959755522c1598f224cde7f59c32db.tar.xz
query libvo for YV12 too
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_md5.c8
-rw-r--r--libvo/vo_pgm.c8
-rw-r--r--mplayer.c13
3 files changed, 19 insertions, 10 deletions
diff --git a/libvo/vo_md5.c b/libvo/vo_md5.c
index 21141e8807..d8bccacaf0 100644
--- a/libvo/vo_md5.c
+++ b/libvo/vo_md5.c
@@ -90,10 +90,10 @@ static uint32_t draw_frame(uint8_t * src[])
static uint32_t
query_format(uint32_t format)
{
- switch(format){
- case IMGFMT_YV12:
- return 1;
- }
+// switch(format){
+// case IMGFMT_YV12:
+// return 1;
+// }
return 0;
}
diff --git a/libvo/vo_pgm.c b/libvo/vo_pgm.c
index bf017e5f86..06032d9894 100644
--- a/libvo/vo_pgm.c
+++ b/libvo/vo_pgm.c
@@ -97,12 +97,12 @@ static uint32_t draw_frame(uint8_t * src[])
static uint32_t
query_format(uint32_t format)
{
- switch(format){
- case IMGFMT_YV12:
+// switch(format){
+// case IMGFMT_YV12:
// case IMGFMT_RGB|24:
// case IMGFMT_BGR|24:
- return 1;
- }
+// return 1;
+// }
return 0;
}
diff --git a/mplayer.c b/mplayer.c
index e174b03093..7c45cd5c37 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -782,8 +782,13 @@ switch(has_video){
break;
}
case 3: { // OpenDivX
- if(verbose) printf("OpenDivX video codec\n");
out_fmt=IMGFMT_YV12;
+ if(!video_out->query_format(out_fmt)) {
+ printf("Sorry, selected video_out device is incompatible with this codec!\n");
+ exit(1);
+ }
+
+ if(verbose) printf("OpenDivX video codec\n");
{ DEC_PARAM dec_param;
DEC_SET dec_set;
dec_param.x_dim = avi_header.bih.biWidth;
@@ -818,6 +823,11 @@ switch(has_video){
break;
}
case 1: {
+ out_fmt=IMGFMT_YV12;
+ if(!video_out->query_format(out_fmt)) {
+ printf("Sorry, selected video_out device is incompatible with this codec!\n");
+ exit(1);
+ }
// Find sequence_header first:
if(verbose) printf("Searching for sequence header... ");fflush(stdout);
while(1){
@@ -860,7 +870,6 @@ switch(has_video){
picture->bitrate*0.5f,
picture->bitrate/16.0f );
// display info:
- out_fmt=IMGFMT_YV12;
// movie_size_x=picture->coded_picture_width;
movie_size_x=picture->display_picture_width;
movie_size_y=picture->display_picture_height;