AVPicture *picture;
int* first_pkt = s->priv_data;
int width, height, h_chroma_shift, v_chroma_shift;
- int i, m;
+ int i;
char buf2[Y4M_LINE_MAX+1];
char buf1[20];
uint8_t *ptr, *ptr1, *ptr2;
/* construct frame header */
- m = snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC);
+ snprintf(buf1, sizeof(buf1), "%s\n", Y4M_FRAME_MAGIC);
avio_write(pb, buf1, strlen(buf1));
width = st->codec->width;
}
AVOutputFormat ff_yuv4mpegpipe_muxer = {
- "yuv4mpegpipe",
- NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
- "",
- "y4m",
- sizeof(int),
- CODEC_ID_NONE,
- CODEC_ID_RAWVIDEO,
- yuv4_write_header,
- yuv4_write_packet,
+ .name = "yuv4mpegpipe",
+ .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+ .mime_type = "",
+ .extensions = "y4m",
+ .priv_data_size = sizeof(int),
+ .audio_codec = CODEC_ID_NONE,
+ .video_codec = CODEC_ID_RAWVIDEO,
+ .write_header = yuv4_write_header,
+ .write_packet = yuv4_write_packet,
.flags = AVFMT_RAWPICTURE,
};
#endif
aspectd = 1;
}
- st = av_new_stream(s, 0);
+ st = avformat_new_stream(s, NULL);
if(!st)
return AVERROR(ENOMEM);
st->codec->width = width;
#if CONFIG_YUV4MPEGPIPE_DEMUXER
AVInputFormat ff_yuv4mpegpipe_demuxer = {
- "yuv4mpegpipe",
- NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
- sizeof(struct frame_attributes),
- yuv4_probe,
- yuv4_read_header,
- yuv4_read_packet,
+ .name = "yuv4mpegpipe",
+ .long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+ .priv_data_size = sizeof(struct frame_attributes),
+ .read_probe = yuv4_probe,
+ .read_header = yuv4_read_header,
+ .read_packet = yuv4_read_packet,
.extensions = "y4m"
};
#endif