Published for compliancy with LGPL
ffmpeg yuv patch to CVS Nov 26, 2005
libavformat/yuv4mpeg.c
- /* for the first packet we have to output the header as well */
- if (*first_pkt) {
- *first_pkt = 0;
- if (yuv4_generate_header(s, buf2) < 0) {
- av_log(s, AV_LOG_ERROR, "Error. YUV4MPEG stream header write failed.\n");
- return AVERROR_IO;
- } else {
- put_buffer(pb, buf2, strlen(buf2));
- }
- }
- /* construct frame header */
- m = snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC);
- put_buffer(pb, buf1, strlen(buf1));
+ *first_pkt = 0;
aspect ratio patch (published in the ffmpeg-devel lists)
ffmpeg.c
ffmpeg.c:
- video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255);
+ video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*video_enc->height/video_enc->width, 255);