[Ffmpeg-cvslog] CVS: ffmpeg/libavformat img2.c,1.12,1.13
Michael Niedermayer CVS
michael
Wed Apr 13 03:07:32 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv11929
Modified Files:
img2.c
Log Message:
non 4:2:0 foobar.{Y,U,V} support
Index: img2.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/img2.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- img2.c 24 Feb 2005 19:08:50 -0000 1.12
+++ img2.c 13 Apr 2005 01:07:30 -0000 1.13
@@ -222,6 +222,8 @@
st->codec.codec_type = CODEC_TYPE_VIDEO;
st->codec.codec_id = av_str2id(img_tags, s->path);
}
+ if(st->codec.codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt)
+ st->codec.pix_fmt = ap->pix_fmt;
return 0;
}
@@ -336,10 +338,10 @@
}
if(codec->codec_id == CODEC_ID_RAWVIDEO){
- int size = (codec->width * codec->height)>>2;
- put_buffer(pb[0], pkt->data , 4*size);
- put_buffer(pb[1], pkt->data + 4*size, size);
- put_buffer(pb[2], pkt->data + 5*size, size);
+ int ysize = codec->width * codec->height;
+ put_buffer(pb[0], pkt->data , ysize);
+ put_buffer(pb[1], pkt->data + ysize, (pkt->size - ysize)/2);
+ put_buffer(pb[2], pkt->data + ysize +(pkt->size - ysize)/2, (pkt->size - ysize)/2);
put_flush_packet(pb[1]);
put_flush_packet(pb[2]);
url_fclose(pb[1]);
More information about the ffmpeg-cvslog
mailing list