comparison raw.c @ 749:1a19a6add674 libavformat

default to YUV420P if none specified for rawvideo input a few more common extensions for rawvideo detection
author michael
date Fri, 06 May 2005 21:28:55 +0000
parents a03f1f7497ad
children c5077fdab490
comparison
equal deleted inserted replaced
748:6bd8b2955534 749:1a19a6add674
64 break; 64 break;
65 case CODEC_TYPE_VIDEO: 65 case CODEC_TYPE_VIDEO:
66 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); 66 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
67 st->codec.width = ap->width; 67 st->codec.width = ap->width;
68 st->codec.height = ap->height; 68 st->codec.height = ap->height;
69 st->codec.pix_fmt = ap->pix_fmt; 69 st->codec.pix_fmt = ap->pix_fmt;
70 if(st->codec.pix_fmt == PIX_FMT_NONE)
71 st->codec.pix_fmt= PIX_FMT_YUV420P;
70 break; 72 break;
71 default: 73 default:
72 return -1; 74 return -1;
73 } 75 }
74 } else { 76 } else {
640 0, 642 0,
641 NULL, 643 NULL,
642 raw_read_header, 644 raw_read_header,
643 rawvideo_read_packet, 645 rawvideo_read_packet,
644 raw_read_close, 646 raw_read_close,
645 .extensions = "yuv", 647 .extensions = "yuv,cif,qcif",
646 .value = CODEC_ID_RAWVIDEO, 648 .value = CODEC_ID_RAWVIDEO,
647 }; 649 };
648 650
649 #ifdef CONFIG_ENCODERS 651 #ifdef CONFIG_ENCODERS
650 AVOutputFormat rawvideo_oformat = { 652 AVOutputFormat rawvideo_oformat = {