]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/daud.c
MPEGTS: Improve probe function
[ffmpeg] / libavformat / daud.c
index e1d901aa1612c79bdd993673dcabd421b665dbcb..5f04e7aaeef07a5064628ffab628160aa64e3c06 100644 (file)
@@ -22,6 +22,8 @@
 
 static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
     AVStream *st = av_new_stream(s, 0);
+    if (!st)
+        return AVERROR(ENOMEM);
     st->codec->codec_type = CODEC_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
     st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
@@ -34,7 +36,7 @@ static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
 }
 
 static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     int ret, size;
     if (url_feof(pb))
         return AVERROR(EIO);
@@ -47,7 +49,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
 
 AVInputFormat daud_demuxer = {
     "daud",
-    "D-Cinema audio format",
+    NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
     0,
     NULL,
     daud_header,