]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/yuv4mpeg.c
lavf: block special characters in dump metadata
[ffmpeg] / libavformat / yuv4mpeg.c
index 90a1b06034b8fe42d2e4fc652fda93ffcf8a37eb..5b6d2df282e22883204b64c0857535ab0c994600 100644 (file)
@@ -214,7 +214,7 @@ static int yuv4_write_header(AVFormatContext *s)
     if (s->nb_streams != 1)
         return AVERROR(EIO);
 
-    if (s->streams[0]->codec->codec_id != CODEC_ID_RAWVIDEO) {
+    if (s->streams[0]->codec->codec_id != AV_CODEC_ID_RAWVIDEO) {
         av_log(s, AV_LOG_ERROR,
                "A non-rawvideo stream was selected, but yuv4mpeg only handles rawvideo streams\n");
         return AVERROR(EINVAL);
@@ -266,11 +266,11 @@ static int yuv4_write_header(AVFormatContext *s)
 
 AVOutputFormat ff_yuv4mpegpipe_muxer = {
     .name              = "yuv4mpegpipe",
-    .long_name         = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+    .long_name         = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"),
     .extensions        = "y4m",
     .priv_data_size    = sizeof(int),
-    .audio_codec       = CODEC_ID_NONE,
-    .video_codec       = CODEC_ID_RAWVIDEO,
+    .audio_codec       = AV_CODEC_ID_NONE,
+    .video_codec       = AV_CODEC_ID_RAWVIDEO,
     .write_header      = yuv4_write_header,
     .write_packet      = yuv4_write_packet,
     .flags             = AVFMT_RAWPICTURE,
@@ -366,10 +366,10 @@ static int yuv4_read_header(AVFormatContext *s)
                 return -1;
             } else if (strncmp("444", tokstart, 3) == 0) {
                 pix_fmt = PIX_FMT_YUV444P;
-            } else if (strncmp("mono", tokstart, 4) == 0) {
-                pix_fmt = PIX_FMT_GRAY8;
             } else if (strncmp("mono16", tokstart, 6) == 0) {
                 pix_fmt = PIX_FMT_GRAY16;
+            } else if (strncmp("mono", tokstart, 4) == 0) {
+                pix_fmt = PIX_FMT_GRAY8;
             } else {
                 av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown "
                        "pixel format.\n");
@@ -485,7 +485,7 @@ static int yuv4_read_header(AVFormatContext *s)
     avpriv_set_pts_info(st, 64, rated, raten);
     st->codec->pix_fmt                = pix_fmt;
     st->codec->codec_type             = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id               = CODEC_ID_RAWVIDEO;
+    st->codec->codec_id               = AV_CODEC_ID_RAWVIDEO;
     st->sample_aspect_ratio           = (AVRational){ aspectn, aspectd };
     st->codec->chroma_sample_location = chroma_sample_location;
 
@@ -543,7 +543,7 @@ static int yuv4_probe(AVProbeData *pd)
 #if CONFIG_YUV4MPEGPIPE_DEMUXER
 AVInputFormat ff_yuv4mpegpipe_demuxer = {
     .name           = "yuv4mpegpipe",
-    .long_name      = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe format"),
+    .long_name      = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"),
     .priv_data_size = sizeof(struct frame_attributes),
     .read_probe     = yuv4_probe,
     .read_header    = yuv4_read_header,