]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nut.c
mp3dec: export replaygain tags from ID3v2
[ffmpeg] / libavformat / nut.c
index e8dbc54a1030217f85c5391a568c10505b6c9ca5..43ae8a0f0ee8715cd60988e6df1175791a4abd4e 100644 (file)
@@ -77,6 +77,10 @@ const AVCodecTag ff_nut_video_tags[] = {
     { AV_CODEC_ID_RAWVIDEO,         MKTAG('R', 'G', 'B',  48) },
     { AV_CODEC_ID_RAWVIDEO,         MKTAG(48,  'B', 'G', 'R') },
     { AV_CODEC_ID_RAWVIDEO,         MKTAG(48,  'R', 'G', 'B') },
+    { AV_CODEC_ID_RAWVIDEO,         MKTAG('R', 'B', 'A', 64 ) },
+    { AV_CODEC_ID_RAWVIDEO,         MKTAG('B', 'R', 'A', 64 ) },
+    { AV_CODEC_ID_RAWVIDEO,         MKTAG(64 , 'R', 'B', 'A') },
+    { AV_CODEC_ID_RAWVIDEO,         MKTAG(64 , 'B', 'R', 'A') },
     { AV_CODEC_ID_RAWVIDEO,         MKTAG('Y', '3',  11,  10) },
     { AV_CODEC_ID_RAWVIDEO,         MKTAG(10,   11, '3', 'Y') },
     { AV_CODEC_ID_RAWVIDEO,         MKTAG('Y', '3',  10,  10) },
@@ -146,6 +150,8 @@ const AVCodecTag ff_nut_audio_tags[] = {
     { AV_CODEC_ID_PCM_U32LE,        MKTAG('P', 'U', 'D',  32) },
     { AV_CODEC_ID_PCM_U8,           MKTAG('P', 'U', 'D',   8) },
     { AV_CODEC_ID_PCM_S16LE_PLANAR, MKTAG('P', 'S', 'P',  16) },
+    { AV_CODEC_ID_PCM_S24LE_PLANAR, MKTAG('P', 'S', 'P',  24) },
+    { AV_CODEC_ID_PCM_S32LE_PLANAR, MKTAG('P', 'S', 'P',  32) },
     { AV_CODEC_ID_MP3,              MKTAG('M', 'P', '3', ' ') },
     { AV_CODEC_ID_NONE,             0 }
 };
@@ -183,11 +189,17 @@ int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b)
     return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32);
 }
 
-void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
+int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
 {
     Syncpoint *sp           = av_mallocz(sizeof(Syncpoint));
     struct AVTreeNode *node = av_tree_node_alloc();
 
+    if (!sp || !node) {
+        av_freep(&sp);
+        av_freep(&node);
+        return AVERROR(ENOMEM);
+    }
+
     sp->pos      = pos;
     sp->back_ptr = back_ptr;
     sp->ts       = ts;
@@ -196,6 +208,8 @@ void ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
         av_free(sp);
         av_free(node);
     }
+
+    return 0;
 }
 
 static int enu_free(void *opaque, void *elem)