]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/yuv4mpeg.c
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
[ffmpeg] / libavformat / yuv4mpeg.c
index d7123211626649c79bdb0ba844e6447d50f5e4d1..e1db1a377b30f52b57801b32250f672cb5d71d0f 100644 (file)
@@ -94,7 +94,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
     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;
@@ -114,7 +114,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
 
     /* 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;
@@ -170,15 +170,15 @@ static int yuv4_write_header(AVFormatContext *s)
 }
 
 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
@@ -327,7 +327,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
         aspectd = 1;
     }
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if(!st)
         return AVERROR(ENOMEM);
     st->codec->width = width;
@@ -391,12 +391,12 @@ static int yuv4_probe(AVProbeData *pd)
 
 #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