]> git.sesse.net Git - ffmpeg/commitdiff
proresdec2: Parse codec_tag and export profile information
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 2 Nov 2018 19:24:45 +0000 (15:24 -0400)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 5 Nov 2018 17:39:23 +0000 (12:39 -0500)
libavcodec/proresdec2.c
libavcodec/version.h

index 6b3021bdfaa22ca53d3dcfe8d46cb48fe04c442f..130a4e3fe8b39f3fc66e1eb38a837445f5b888ce 100644 (file)
@@ -62,6 +62,30 @@ static av_cold int decode_init(AVCodecContext *avctx)
     permute(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation);
     permute(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation);
 
+    switch (avctx->codec_tag) {
+    case MKTAG('a','p','c','o'):
+        avctx->profile = FF_PROFILE_PRORES_PROXY;
+        break;
+    case MKTAG('a','p','c','s'):
+        avctx->profile = FF_PROFILE_PRORES_LT;
+        break;
+    case MKTAG('a','p','c','n'):
+        avctx->profile = FF_PROFILE_PRORES_STANDARD;
+        break;
+    case MKTAG('a','p','c','h'):
+        avctx->profile = FF_PROFILE_PRORES_HQ;
+        break;
+    case MKTAG('a','p','4','h'):
+        avctx->profile = FF_PROFILE_PRORES_4444;
+        break;
+    case MKTAG('a','p','4','x'):
+        avctx->profile = FF_PROFILE_PRORES_XQ;
+        break;
+    default:
+        avctx->profile = FF_PROFILE_UNKNOWN;
+        av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
+    }
+
     return 0;
 }
 
index 893ab9b0d1bf45ce1530f904e700cda807b01897..0351b36c2b8a81146fe1d21bb626d8ca34a25366 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  38
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \