]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ncdec.c
mp3dec: read the initial/trailing padding from the LAME tag
[ffmpeg] / libavformat / ncdec.c
index ab1d302a8210273a8fc45e932b0ab9a8ffadd388..d726a2e42b5f7484a948031f34b3ad3009914ca0 100644 (file)
@@ -44,15 +44,15 @@ static int nc_probe(AVProbeData *probe_packet)
     return 0;
 }
 
-static int nc_read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int nc_read_header(AVFormatContext *s)
 {
     AVStream *st = avformat_new_stream(s, NULL);
 
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id   = CODEC_ID_MPEG4;
+    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_id   = AV_CODEC_ID_MPEG4;
     st->need_parsing      = AVSTREAM_PARSE_FULL;
 
     avpriv_set_pts_info(st, 64, 1, 100);
@@ -83,7 +83,7 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     ret = av_get_packet(s->pb, pkt, size);
     if (ret != size) {
-        if (ret > 0) av_free_packet(pkt);
+        if (ret > 0) av_packet_unref(pkt);
         return AVERROR(EIO);
     }
 
@@ -93,9 +93,9 @@ static int nc_read_packet(AVFormatContext *s, AVPacket *pkt)
 
 AVInputFormat ff_nc_demuxer = {
     .name           = "nc",
-    .long_name      = NULL_IF_CONFIG_SMALL("NC camera feed format"),
+    .long_name      = NULL_IF_CONFIG_SMALL("NC camera feed"),
     .read_probe     = nc_probe,
     .read_header    = nc_read_header,
     .read_packet    = nc_read_packet,
-    .extensions = "v",
+    .extensions     = "v",
 };