QTfrontend/util/LibavInteraction.cpp
branch0.9.22
changeset 11296 2f812d4513d1
parent 11295 210650fc7182
child 11356 ac423fd2b9a3
equal deleted inserted replaced
11295:210650fc7182 11296:2f812d4513d1
   114 
   114 
   115             // check if codec supports yuv 4:2:0 format
   115             // check if codec supports yuv 4:2:0 format
   116             if (!pCodec->pix_fmts)
   116             if (!pCodec->pix_fmts)
   117                 continue;
   117                 continue;
   118             bool yuv420Supported = false;
   118             bool yuv420Supported = false;
   119             for (const AVPixelFormat* pfmt = pCodec->pix_fmts; *pfmt != -1; pfmt++)
   119             for (const enum AVPixelFormat* pfmt = pCodec->pix_fmts; *pfmt != -1; pfmt++)
   120                 if (*pfmt == AV_PIX_FMT_YUV420P)
   120                 if (*pfmt == AV_PIX_FMT_YUV420P)
   121                 {
   121                 {
   122                     yuv420Supported = true;
   122                     yuv420Supported = true;
   123                     break;
   123                     break;
   124                 }
   124                 }
   129         {
   129         {
   130             // check if codec supports signed 16-bit format
   130             // check if codec supports signed 16-bit format
   131             if (!pCodec->sample_fmts)
   131             if (!pCodec->sample_fmts)
   132                 continue;
   132                 continue;
   133             bool s16Supported = false;
   133             bool s16Supported = false;
   134             for (const AVSampleFormat* pfmt = pCodec->sample_fmts; *pfmt != -1; pfmt++)
   134             for (const enum AVSampleFormat* pfmt = pCodec->sample_fmts; *pfmt != -1; pfmt++)
   135                 if (*pfmt == AV_SAMPLE_FMT_S16)
   135                 if (*pfmt == AV_SAMPLE_FMT_S16)
   136                 {
   136                 {
   137                     s16Supported = true;
   137                     s16Supported = true;
   138                     break;
   138                     break;
   139                 }
   139                 }