]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nsvdec.c
Make rtp_write_header() fail in case of unsupported payload type
[ffmpeg] / libavformat / nsvdec.c
index 9fdb1a8796cd2344f54d065800a70924a569d63c..719337c898db768a891d9e99c81de9e2ad45b86c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * NSV demuxer
- * Copyright (c) 2004 The FFmpeg Project.
+ * Copyright (c) 2004 The FFmpeg Project
  *
  * This file is part of FFmpeg.
  *
@@ -337,15 +337,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap)
                 break;
             *p++ = '\0';
             PRINT(("NSV NSVf INFO: %s='%s'\n", token, value));
-            if (!strcmp(token, "ASPECT")) {
-                /* don't care */
-            } else if (!strcmp(token, "CREATOR") || !strcmp(token, "Author")) {
-                strncpy(s->author, value, 512-1);
-            } else if (!strcmp(token, "Copyright")) {
-                strncpy(s->copyright, value, 512-1);
-            } else if (!strcmp(token, "TITLE") || !strcmp(token, "Title")) {
-                strncpy(s->title, value, 512-1);
-            }
+            av_metadata_set(&s->metadata, token, value);
         }
         av_free(strings);
     }
@@ -456,7 +448,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
             st->codec->codec_id = codec_get_id(nsv_codec_video_tags, vtag);
             st->codec->width = vwidth;
             st->codec->height = vheight;
-            st->codec->bits_per_sample = 24; /* depth XXX */
+            st->codec->bits_per_coded_sample = 24; /* depth XXX */
 
             av_set_pts_info(st, 64, framerate.den, framerate.num);
             st->start_time = 0;
@@ -753,7 +745,7 @@ static int nsv_probe(AVProbeData *p)
 
 AVInputFormat nsv_demuxer = {
     "nsv",
-    NULL_IF_CONFIG_SMALL("NullSoft Video format"),
+    NULL_IF_CONFIG_SMALL("Nullsoft Streaming Video"),
     sizeof(NSVContext),
     nsv_probe,
     nsv_read_header,