[FFmpeg-devel,1/4] avcodec/proresdec2: change profile only if it is unknown

Submitted by Paul B Mahol on Dec. 5, 2018, 5:52 p.m.

Details

Message ID 20181205175209.26199-1-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol Dec. 5, 2018, 5:52 p.m.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/proresdec2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Gregor Riepl Dec. 5, 2018, 6 p.m.
There seems to be an indentation issue here:

> +    if (avctx->profile == FF_PROFILE_UNKNOWN) {
>      switch (avctx->codec_tag) {
>      case MKTAG('a','p','c','o'):

and here:

>          av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
>      }
> +    }
Carl Eugen Hoyos Dec. 5, 2018, 9:34 p.m.
2018-12-05 19:00 GMT+01:00, Gregor Riepl <onitake@gmail.com>:
> There seems to be an indentation issue here:

This is intended to allow an actual review.

Carl Eugen

Patch hide | download patch | download mbox

diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 8581d797fb..f715b86aad 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -140,6 +140,7 @@  static av_cold int decode_init(AVCodecContext *avctx)
 
     avctx->bits_per_raw_sample = 10;
 
+    if (avctx->profile == FF_PROFILE_UNKNOWN) {
     switch (avctx->codec_tag) {
     case MKTAG('a','p','c','o'):
         avctx->profile = FF_PROFILE_PRORES_PROXY;
@@ -162,9 +163,9 @@  static av_cold int decode_init(AVCodecContext *avctx)
         avctx->bits_per_raw_sample = 12;
         break;
     default:
-        avctx->profile = FF_PROFILE_UNKNOWN;
         av_log(avctx, AV_LOG_WARNING, "Unknown prores profile %d\n", avctx->codec_tag);
     }
+    }
 
     if (avctx->bits_per_raw_sample == 10) {
         av_log(avctx, AV_LOG_DEBUG, "Auto bitdepth precision. Use 10b decoding based on codec tag");