Commit 42946ab5 authored by michael's avatar michael

default to YUV420P if none specified for rawvideo input

a few more common extensions for rawvideo detection


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4192 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent da5ed779
...@@ -67,6 +67,8 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -67,6 +67,8 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec.width = ap->width; st->codec.width = ap->width;
st->codec.height = ap->height; st->codec.height = ap->height;
st->codec.pix_fmt = ap->pix_fmt; st->codec.pix_fmt = ap->pix_fmt;
if(st->codec.pix_fmt == PIX_FMT_NONE)
st->codec.pix_fmt= PIX_FMT_YUV420P;
break; break;
default: default:
return -1; return -1;
...@@ -642,7 +644,7 @@ AVInputFormat rawvideo_iformat = { ...@@ -642,7 +644,7 @@ AVInputFormat rawvideo_iformat = {
raw_read_header, raw_read_header,
rawvideo_read_packet, rawvideo_read_packet,
raw_read_close, raw_read_close,
.extensions = "yuv", .extensions = "yuv,cif,qcif",
.value = CODEC_ID_RAWVIDEO, .value = CODEC_ID_RAWVIDEO,
}; };
......
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